From 71b6d0601e70546c8abfcad14e0870c22a9b45aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Wed, 30 May 2007 14:30:20 +0000 Subject: [PATCH] basic verbosity for debug mode --- org.glite.lb.server/src/ws_query.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/org.glite.lb.server/src/ws_query.c b/org.glite.lb.server/src/ws_query.c index f8cd589..bc5e1ab 100644 --- a/org.glite.lb.server/src/ws_query.c +++ b/org.glite.lb.server/src/ws_query.c @@ -22,6 +22,8 @@ #define __lb__QueryEvents __ns1__QueryEvents #endif +extern int debug; +#define dprintf(x) if (debug) printf x static void freeQueryRecsExt(edg_wll_QueryRec **qr); static void freeJobIds(edg_wlc_JobId *jobs); @@ -34,6 +36,8 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__GetVersion( struct _lbe__GetVersion *in, struct _lbe__GetVersionResponse *out) { + dprintf(("[%d] %s\n",getpid(),__FUNCTION__)); + out->version = soap_strdup(soap, VERSION); return out->version ? SOAP_OK : SOAP_FAULT; @@ -51,6 +55,8 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__JobStatus( int flags; + dprintf(("[%d] %s\n",getpid(),__FUNCTION__)); + if ( edg_wlc_JobIdParse(in->jobid, &j) ) { edg_wll_SetError(ctx, EINVAL, in->jobid); @@ -85,6 +91,9 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__QueryJobs( edg_wll_JobStat *states; int ret; + + dprintf(("[%d] %s\n",getpid(),__FUNCTION__)); + out->states = soap_malloc(soap, sizeof(*out->states)); out->jobs = soap_malloc(soap, sizeof(*out->jobs)); if ( !out->states || !out->jobs ) goto cleanup; @@ -126,6 +135,9 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__UserJobs( edg_wlc_JobId *jobs; edg_wll_JobStat *states; + + dprintf(("[%d] %s\n",getpid(),__FUNCTION__)); + ctx = (edg_wll_Context) glite_gsplugin_get_udata(soap); memset(out, 0, sizeof *out); if (edg_wll_UserJobs(ctx, &jobs, &states) != 0) goto fault; @@ -157,6 +169,8 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__QueryEvents( int ret = SOAP_OK; + dprintf(("[%d] %s\n",getpid(),__FUNCTION__)); + edg_wll_ResetError(ctx); if ( edg_wll_SoapToQueryCondsExt(in->jobConditions, in->__sizejobConditions, &job_conditions) ) @@ -176,7 +190,6 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__QueryEvents( goto cleanup; } - if (edg_wll_QueryEventsServer(ctx, ctx->noAuth, (const edg_wll_QueryRec **)job_conditions, (const edg_wll_QueryRec **)event_conditions, -- 1.8.2.3