From 6278a2b0d412d2be1cf462bc454bc0e4f7d4c7bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Voc=C5=AF?= Date: Mon, 14 May 2012 09:48:48 +0000 Subject: [PATCH] fixes to pbs statemachine --- org.glite.lb.state-machine/src/process_event_pbs.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/org.glite.lb.state-machine/src/process_event_pbs.c b/org.glite.lb.state-machine/src/process_event_pbs.c index 8317851..ab8a81c 100644 --- a/org.glite.lb.state-machine/src/process_event_pbs.c +++ b/org.glite.lb.state-machine/src/process_event_pbs.c @@ -244,9 +244,7 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c if (USABLE_DATA(res)) { if(e->any.source == EDG_WLL_SOURCE_PBS_SERVER) { /* queue */ - if (!js->pub.pbs_queue) - js->pub.pbs_queue = strdup(e->PBSQueued.queue); - assert(!strcmp(js->pub.pbs_queue, e->PBSQueued.queue)); + rep(js->pub.pbs_queue, e->PBSQueued.queue); /* job owner */ if(!js->pub.pbs_owner) @@ -338,10 +336,13 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c break; case EDG_WLL_SOURCE_PBS_SMOM: case EDG_WLL_SOURCE_PBS_MOM: - if (!js->pbs_reruning) { - js->pub.state = EDG_WLL_JOB_DONE; - js->pub.done_code = EDG_WLL_STAT_OK; - } + /* we are not done until server says so */ + /* + * if (!js->pbs_reruning) { + * js->pub.state = EDG_WLL_JOB_DONE; + * js->pub.done_code = EDG_WLL_STAT_OK; + *} + */ break; default: assert(0); //done event from strange source @@ -357,7 +358,7 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c case EDG_WLL_EVENT_PBSRESOURCEUSAGE: if (USABLE(res)) { // signalize state done, done_code uknown - js->pub.state = EDG_WLL_JOB_DONE; + /* nonsense: js->pub.state = EDG_WLL_JOB_DONE; */ } if (USABLE_DATA(res)) { /*trio_asprintf(&new_resource_usage,"%s%s\t%s = %f [%s]", -- 1.8.2.3