return 0;
}
+const char *client_get_query(struct client *cl, const char **type, NMEM nmem)
+{
+ if (cl->pquery)
+ {
+ *type = "pqf";
+ return nmem_strdup(nmem, cl->pquery);
+ }
+ if (cl->cqlquery)
+ {
+ *type = "cql";
+ return nmem_strdup(nmem, cl->cqlquery);
+ }
+ *type = 0;
+ return 0;
+}
+
int client_start_search(struct client *cl)
{
struct session_database *sdb = client_get_database(cl);
{
if (cl->pquery)
session_log(se, YLOG_LOG, "Client %s: "
- "Re-search due query/limit change: %s to %s",
+ "Re-search due query/limit change: %s to %s",
client_get_id(cl), cl->pquery, wrbuf_cstr(w_pqf));
xfree(cl->pquery);
cl->pquery = xstrdup(wrbuf_cstr(w_pqf));
return cl->diagnostic;
}
-const char * client_get_suggestions_xml(struct client *cl, WRBUF wrbuf)
+const char *client_get_suggestions_xml(struct client *cl, WRBUF wrbuf)
{
/* int idx; */
struct suggestions *suggestions = cl->suggestions;
- if (!suggestions)
+ if (!suggestions)
return "";
if (suggestions->passthrough)
{
return wrbuf_cstr(wrbuf);
}
-
void client_set_database(struct client *cl, struct session_database *db)
{
cl->database = db;