From: Dennis Schafroth Date: Fri, 30 Sep 2011 12:34:07 +0000 (+0200) Subject: Check for valid zquery X-Git-Tag: v1.6.4~5^2~36^2~1 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=9b073e43ba4687753b553036029540c8af279dad;p=pazpar2-moved-to-github.git Check for valid zquery --- diff --git a/src/client.c b/src/client.c index 5bebb59..dcda559 100644 --- a/src/client.c +++ b/src/client.c @@ -916,10 +916,14 @@ static char *make_solrquery(struct client *cl) ODR odr_out = odr_createmem(ODR_ENCODE); zquery = p_query_rpn(odr_out, cl->pquery); + if (zquery == 0) { + yaz_log(YLOG_WARN, "Failed to generate RPN from PQF: %s", cl->pquery); + return 0; + } yaz_log(YLOG_LOG, "PQF: %s", cl->pquery); if ((status = solr_transform_rpn2solr_wrbuf(sqlt, wrb, zquery))) { - yaz_log(YLOG_WARN, "Failed to generate SOLR query, code=%d", status); + yaz_log(YLOG_WARN, "Failed to generate SOLR query from PQF %s, code=%d", cl->pquery, status); r = 0; } else