+
+ if (ccl_wrbuf)
+ {
+ // CCL to PQF
+ assert(pqf_wrbuf == 0);
+ int cerror, cpos;
+ struct ccl_rpn_node *cn;
+ cn = ccl_find_str(b->sptr->ccl_bibset, wrbuf_cstr(ccl_wrbuf),
+ &cerror, &cpos);
+ wrbuf_destroy(ccl_wrbuf);
+ if (!cn)
+ {
+ char *addinfo = odr_strdup(odr, ccl_err_msg(cerror));
+
+ apdu_res =
+ odr.create_searchResponse(apdu_req,
+ YAZ_BIB1_MALFORMED_QUERY,
+ addinfo);
+ package.response() = apdu_res;
+ return;
+ }
+ pqf_wrbuf = wrbuf_alloc();
+ ccl_pquery(pqf_wrbuf, cn);
+ ccl_rpn_delete(cn);
+ }
+
+ assert(pqf_wrbuf);
+ b->search_pqf(wrbuf_cstr(pqf_wrbuf), &hits, &error, &addinfo);
+
+ wrbuf_destroy(pqf_wrbuf);