From 8f08e9143101a3ededa7eec884736df66ce91268 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Wed, 15 Feb 2012 15:21:38 +0000 Subject: [PATCH] Error message better than just NULL for no-index queries --- org.glite.lb.server/src/query.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/org.glite.lb.server/src/query.c b/org.glite.lb.server/src/query.c index 3e2d082..574fb62 100644 --- a/org.glite.lb.server/src/query.c +++ b/org.glite.lb.server/src/query.c @@ -751,7 +751,7 @@ int check_job_query_index(edg_wll_Context ctx, const edg_wll_QueryRec **jc) } return edg_wll_SetError(ctx,EDG_WLL_ERROR_NOINDEX, - is_all_query(jc) ? "\"-all\" queries denied by server configuration" : NULL); + is_all_query(jc) ? "\"-all\" queries denied by server configuration" : "No indexed condition in query"); } #define opToString(op) \ @@ -1075,6 +1075,15 @@ static char *jc_to_head_where( } break; + case EDG_WLL_QUERY_ATTR_NETWORK_SERVER: + ct++; + if ( jc[m][n].op != EDG_WLL_QUERY_OP_EQUAL && jc[m][n].op != EDG_WLL_QUERY_OP_UNEQUAL ) + { + edg_wll_SetError(ctx, EINVAL, "only `=' and '!=' supported with network server"); + return NULL; + } + break; + case EDG_WLL_QUERY_ATTR_PARENT: ct++; if ( jc[m][n].op != EDG_WLL_QUERY_OP_EQUAL && jc[m][n].op != EDG_WLL_QUERY_OP_UNEQUAL ) @@ -1287,6 +1296,7 @@ static char *jc_to_head_where( break; case EDG_WLL_QUERY_ATTR_DESTINATION: + case EDG_WLL_QUERY_ATTR_NETWORK_SERVER: case EDG_WLL_QUERY_ATTR_LOCATION: case EDG_WLL_QUERY_ATTR_RESUBMITTED: case EDG_WLL_QUERY_ATTR_USERTAG: -- 1.8.2.3