From: Miloš Mulač Date: Mon, 25 Feb 2008 12:47:33 +0000 (+0000) Subject: job_status working X-Git-Tag: merge_transactions_src~26 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=a06052cc5a3f01ea7cabf20cf9b9af01b1b14dd3;p=jra1mw.git job_status working - proper initialization - typo in SQL syntax --- diff --git a/org.glite.lb.server/src/db_calls.c b/org.glite.lb.server/src/db_calls.c index 970ce55..bc86fef 100644 --- a/org.glite.lb.server/src/db_calls.c +++ b/org.glite.lb.server/src/db_calls.c @@ -56,7 +56,7 @@ clean: /* just lock one row corresponding to job in table jobs - * lock_mode: 0 = in share mode / 1 = for update + * lock_mode: 0 = lock in share mode / 1 = for update */ int edg_wll_LockJobRow(edg_wll_Context ctx, glite_jobid_const_t job, int lock_mode) { @@ -72,7 +72,7 @@ int edg_wll_LockJobRow(edg_wll_Context ctx, glite_jobid_const_t job, int lock_mo if (lock_mode) trio_asprintf(&stmt, "select count(*) from jobs where jobid='%|Ss' for update", jobid_md5); else - trio_asprintf(&stmt, "select count(*) from jobs where jobid='%|Ss' in share mode", jobid_md5); + trio_asprintf(&stmt, "select count(*) from jobs where jobid='%|Ss' lock in share mode", jobid_md5); if ((nr = edg_wll_ExecSQL(ctx,stmt,&sh)) < 0) goto cleanup; if (nr == 0) { diff --git a/org.glite.lb.server/src/jobstat.c b/org.glite.lb.server/src/jobstat.c index 39bc568..41add31 100644 --- a/org.glite.lb.server/src/jobstat.c +++ b/org.glite.lb.server/src/jobstat.c @@ -97,7 +97,7 @@ int edg_wll_JobStatusServer( edg_wll_ResetError(ctx); - jobstat.pub.owner = NULL; + memset(&jobstat, 0, sizeof(jobstat)); string_jobid = edg_wlc_JobIdUnparse(job); if (string_jobid == NULL || stat == NULL) return edg_wll_SetError(ctx,EINVAL, NULL);