From: František Dvořák Date: Thu, 23 Jun 2011 14:12:23 +0000 (+0000) Subject: Fix classads (in job status structure) when using in web services. X-Git-Tag: glite-lbjp-common_R_3_0_8_1~26 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=ac03e4d81987873e39f8b2865fd33992b338dcdc;p=jra1mw.git Fix classads (in job status structure) when using in web services. --- diff --git a/org.glite.lb.server/src/ws_typeref.c.T b/org.glite.lb.server/src/ws_typeref.c.T index 069400c..65731e5 100644 --- a/org.glite.lb.server/src/ws_typeref.c.T +++ b/org.glite.lb.server/src/ws_typeref.c.T @@ -19,6 +19,7 @@ limitations under the License. #include #include #include +#include #include "soap_version.h" #include "bk_ws_H.h" @@ -248,6 +249,10 @@ int edg_wll_StatusToSoap(struct soap *soap,edg_wll_JobStat const *src,struct lbt gen "\tjs->$usuc->tvUsec = src->$_.tv_usec;\n"; } elsif ($ft eq 'string') { gen "\tjs->$usuc = soap_strdup(soap,src->$_);\n"; + } elsif ($ft eq 'cclassad') { + gen "\ts = cclassad_unparse(src->$_);\n"; + gen "\tjs->$usuc = s ? soap_strdup(soap, s) : NULL;\n"; + gen "\tfree(s);\n"; } elsif ($f->{null}) { gen qq{ ! if (src->$_ == $f->{null}) js->$usuc = NULL; @@ -326,6 +331,9 @@ void edg_wll_SoapToStatus(struct soap *soap,struct lbt__jobStatus const *src,edg } elsif ($ft eq 'string') { gen "\tdest->$_ = src->$usuc;\n"; gen "\tsoap_unlink(soap,src->$usuc);\n"; + } elsif ($ft eq 'cclassad') { + gen "\tdest->$_ = cclassad_create(src->$usuc);\n"; + gen "\tsoap_unlink(soap,src->$usuc);\n"; } elsif ($f->{null}) { gen "\tdest->$_ = (src->$usuc) ? *(src->$usuc) : $f->{null};\n"; } else {