From 6c5c1511573f6c7919ca258206666e1c0a7c8ec8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Fri, 2 Sep 2005 13:37:32 +0000 Subject: [PATCH] fixes & cleanup in QueryConds conversions --- org.glite.jp.index/src/soap_ps_calls.c | 21 ++------------------- org.glite.jp.index/src/ws_typeref.c | 3 +++ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/org.glite.jp.index/src/soap_ps_calls.c b/org.glite.jp.index/src/soap_ps_calls.c index be58808..ed0755b 100644 --- a/org.glite.jp.index/src/soap_ps_calls.c +++ b/org.glite.jp.index/src/soap_ps_calls.c @@ -88,22 +88,8 @@ printf("MyFeedIndex for %s called\n", dest); in.__sizeattributes = i; in.attributes = conf->attrs; -/* - // XXX: we need C -> WSDL conversion function ! - query.attr = conf->query[0][0].attr; - query.op = conf->query[0][0].op; // XXX: nasty, needs conversion - query.origin = malloc(sizeof(*query.origin)); - *query.origin = jptype__attrOrig__USER; - value.string = conf->query[0][0].value; // XXX: hope string -// memset(&blob, 0, sizeof(blob)); -// value.blob = &blob; - value.blob = NULL; - query.value = &value; - query.value2 = NULL; -*/ - for (i=0; conf->query[i]; i++); - in.__sizeconditions = i; - in.conditions = malloc(i * sizeof(*in.conditions)); + for (in.__sizeconditions=0; conf->query[in.__sizeconditions]; in.__sizeconditions++); + in.conditions = malloc(in.__sizeconditions * sizeof(*in.conditions)); for (i=0; conf->query[i]; i++) { if (glite_jpis_QueryCondToSoap(soap, conf->query[i], &(in.conditions[i])) != SOAP_OK) { @@ -112,9 +98,6 @@ printf("MyFeedIndex for %s called\n", dest); } } - in.conditions[0] = &query; // XXX: supp. only one dimensional queries ! (no ORs) - // for 2D queries one more _sizeconditions needed IMO - in.history = conf->history; in.continuous = conf->continuous; diff --git a/org.glite.jp.index/src/ws_typeref.c b/org.glite.jp.index/src/ws_typeref.c index ae10272..58a5ce5 100644 --- a/org.glite.jp.index/src/ws_typeref.c +++ b/org.glite.jp.index/src/ws_typeref.c @@ -53,6 +53,7 @@ static int QueryValToSoap( assert(in); assert(out); if ( !(val = soap_malloc(soap, sizeof(*val))) ) return SOAP_FAULT; + memset(val, 0, sizeof(*val) ); if (binary) { val->string = NULL; @@ -67,6 +68,8 @@ static int QueryValToSoap( if ( !(val->string = soap_strdup(soap, in)) ) return SOAP_FAULT; } + *out = val; + return SOAP_OK; } -- 1.8.2.3