From a3108a913e42b1f1ce9091ad8d893b61dcef0b2b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Tue, 14 Apr 2009 14:44:10 +0000 Subject: [PATCH] - Removed duplicate wrapping of jobid with prefixes/postfixes - Replaced sizeof() call with sizofa() for better results (AKA segfault fix :-) --- org.glite.lb.server/src/query.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/org.glite.lb.server/src/query.c b/org.glite.lb.server/src/query.c index 69372da..4a79e2d 100644 --- a/org.glite.lb.server/src/query.c +++ b/org.glite.lb.server/src/query.c @@ -333,8 +333,7 @@ int edg_wll_QueryJobsServer( *res[3], *dbjob, *zomb_where = NULL, - *zomb_where_temp = NULL, - *full_jobid = NULL; + *zomb_where_temp = NULL; edg_wlc_JobId *jobs_out = NULL; edg_wll_JobStat *states_out = NULL; glite_lbu_Statement sh; @@ -550,10 +549,9 @@ limit_cycle_cleanup: states_out = (edg_wll_JobStat *) calloc(j+1, sizeof(*states_out)); i = 0; - while ( (ret=edg_wll_FetchRow(ctx,sh,sizeof(res),NULL,res)) > 0 ) { - asprintf(&full_jobid,"https://%s/%s%s",res[0],res[1],res[2]); - edg_wlc_JobIdParse(full_jobid, jobs_out+i); - edg_wlc_JobIdParse(full_jobid, &(states_out[i].jobId)); + while ( (ret=edg_wll_FetchRow(ctx,sh,sizofa(res),NULL,res)) > 0 ) { + edg_wlc_JobIdParse(res[0], jobs_out+i); + edg_wlc_JobIdParse(res[0], &(states_out[i].jobId)); states_out[i].state = EDG_WLL_JOB_PURGED; free(res[0]); free(res[1]); free(res[2]); -- 1.8.2.3