X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fclient.c;h=5ebc11c2b1b5fc1ca6b23444407e5ac9a8b2c929;hb=aecf31f5f3b2c09c07061dda3476cd724e369ccc;hp=6e84061325642db1a2b5ff759f5203c9fbeac3a1;hpb=237adf1a78caad95966560c9efdba05c485c9ac2;p=pazpar2-moved-to-github.git diff --git a/src/client.c b/src/client.c index 6e84061..5ebc11c 100644 --- a/src/client.c +++ b/src/client.c @@ -1387,11 +1387,21 @@ static int apply_limit(struct client *cl, const char *id = session_lookup_id_facet(cl->session, cl, name, values[i]); - if (id) { - values[i] = nmem_strdup(nmem_tmp, id); - yaz_log(YLOG_DEBUG, - "apply_limit: s='%s' found id '%s'",s->name,id ); - + if (id) + { + if ( *id ) + { + values[i] = nmem_strdup(nmem_tmp, id); + yaz_log(YLOG_DEBUG, + "apply_limit: s='%s' found id '%s'",s->name,id ); + } + else + { + yaz_log(YLOG_DEBUG, + "apply_limit: %s: term '%s' not found, failing client", + s->name, values[i] ); + ret = -1; + } } } nmem_strsplit_escape2(nmem_tmp, ",", s->value, &cvalues,