From 9b073e43ba4687753b553036029540c8af279dad Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Fri, 30 Sep 2011 14:34:07 +0200 Subject: [PATCH] Check for valid zquery --- src/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 1.7.10.4