From be620b9c944112df7618b75391bc8f38b6b838a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 31 May 2007 18:11:28 +0000 Subject: [PATCH] Fixed lost error structure. Restrictive check for wanted attributes before running SQL command. --- org.glite.jp.index/src/soap_ops.c | 5 +++++ org.glite.jp.ws-interface/src/ws_fault.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/org.glite.jp.index/src/soap_ops.c b/org.glite.jp.index/src/soap_ops.c index eb6880b..915721b 100644 --- a/org.glite.jp.index/src/soap_ops.c +++ b/org.glite.jp.index/src/soap_ops.c @@ -179,6 +179,11 @@ static int checkConditions(glite_jpis_context_t ctx, struct _jpelem__QueryJobs * for (j = 0; ctx->conf->attrs[j] && strcasecmp(ctx->conf->attrs[j], attr) != 0; j++); if (!ctx->conf->attrs[j]) return 1; } + for (i = 0; i < in->__sizeattributes; i++) { + if ((attr = in->attributes[i]) == NULL) return 1; + for (j = 0; ctx->conf->attrs[j] && strcasecmp(ctx->conf->attrs[j], attr) != 0; j++); + if (!ctx->conf->attrs[j]) return 1; + } return 0; } diff --git a/org.glite.jp.ws-interface/src/ws_fault.c b/org.glite.jp.ws-interface/src/ws_fault.c index 1d62782..8d1746c 100644 --- a/org.glite.jp.ws-interface/src/ws_fault.c +++ b/org.glite.jp.ws-interface/src/ws_fault.c @@ -40,7 +40,8 @@ static int glite_jp_clientCheckFault(struct soap *soap, int err, const char *nam { struct SOAP_ENV__Detail *detail; struct jptype__genericFault *f; - char *reason,indent[200] = " "; + const char *reason; + char indent[200] = " "; char *prefix; int retval; @@ -140,4 +141,7 @@ static void glite_jp_server_err2fault(const glite_jp_context_t ctx,struct soap * #endif detail->__type = GFNUM; detail->__any = NULL; + + if (soap->version == 2) soap->fault->SOAP_ENV__Detail = detail; + else soap->fault->detail = detail; } -- 1.8.2.3