Fixed lost error structure.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 31 May 2007 18:11:28 +0000 (18:11 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 31 May 2007 18:11:28 +0000 (18:11 +0000)
Restrictive check for wanted attributes before running SQL command.

org.glite.jp.index/src/soap_ops.c
org.glite.jp.ws-interface/src/ws_fault.c

index eb6880b..915721b 100644 (file)
@@ -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;
 }
index 1d62782..8d1746c 100644 (file)
@@ -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;
 }