ignore branches for UI part of seq. number (and NS - it was already implemented)
authorMiloš Mulač <mulac@civ.zcu.cz>
Fri, 23 Nov 2007 12:20:59 +0000 (12:20 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Fri, 23 Nov 2007 12:20:59 +0000 (12:20 +0000)
- it enables events to switch state of the job when comming from UI or NS despite of resubmission branches

org.glite.lb.server/src/process_event.c

index e305b08..76c0219 100644 (file)
@@ -234,10 +234,14 @@ static char* location_string(const char *source, const char *host, const char *i
        return ret;
 }
 
+/* is seq. number of 'es' before WMS higher then 'js' */
 static int after_enter_wm(const char *es,const char *js)
 {
-       return component_seqcode(es,EDG_WLL_SOURCE_NETWORK_SERVER) >
-               component_seqcode(js,EDG_WLL_SOURCE_NETWORK_SERVER);
+       return ((component_seqcode(es,EDG_WLL_SOURCE_NETWORK_SERVER) >
+               component_seqcode(js,EDG_WLL_SOURCE_NETWORK_SERVER))
+               ||
+               (component_seqcode(es,EDG_WLL_SOURCE_USER_INTERFACE) >
+               component_seqcode(js,EDG_WLL_SOURCE_USER_INTERFACE)));
 }
 
 
@@ -280,7 +284,7 @@ static int processEvent_glite(intJobStat *js, edg_wll_Event *e, int ev_seq, int
                res = RET_LATE;
        }
 
-/* new event coming from NS => forget about any resubmission loops */
+/* new event coming from NS or UI => forget about any resubmission loops */
        if (e->type != EDG_WLL_EVENT_CANCEL && 
                js->last_seqcode &&
                after_enter_wm(e->any.seqcode,js->last_seqcode))