X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fclient.c;h=6473597f15571c54366d5a64b00fed49c59db447;hb=c453835b907746dd07babd58ac15ce11dca2eb7b;hp=ad9d2376b00e1f0b32084844f8176c1fb382f2f5;hpb=e107b0011a295ccc61502d6e5ea79d9125a3fbb4;p=pazpar2-moved-to-github.git diff --git a/src/client.c b/src/client.c index ad9d237..6473597 100644 --- a/src/client.c +++ b/src/client.c @@ -21,13 +21,25 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \brief Z39.50 client */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include +#if HAVE_SYS_TIME_H #include +#endif +#if HAVE_UNISTD_H #include +#endif +#if HAVE_SYS_SOCKET_H #include +#endif +#if HAVE_NETDB_H #include +#endif #include #include #include @@ -46,16 +58,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#if HAVE_CONFIG_H -#include "cconfig.h" -#endif - #define USE_TIMING 0 #if USE_TIMING #include #endif +#if HAVE_NETINET_IN_H #include +#endif #include "pazpar2.h" @@ -980,6 +990,8 @@ int client_parse_query(struct client *cl, const char *query) struct ccl_rpn_node *cn; int cerror, cpos; CCL_bibset ccl_map = prepare_cclmap(cl); + struct session_database *sdb = client_get_database(cl); + const char *pqf_prefix = session_setting_oneval(sdb, PZ_PQF_PREFIX); if (!ccl_map) return -1; @@ -994,6 +1006,11 @@ int client_parse_query(struct client *cl, const char *query) return -1; } wrbuf_rewind(se->wrbuf); + if (*pqf_prefix) + { + wrbuf_puts(se->wrbuf, pqf_prefix); + wrbuf_puts(se->wrbuf, " "); + } ccl_pquery(se->wrbuf, cn); xfree(cl->pquery); cl->pquery = xstrdup(wrbuf_cstr(se->wrbuf));