--- source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager_state.c Mon Feb 2 16:32:13 2004 +++ source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager_state.c Mon Feb 2 16:42:44 2004 @@ -2058,10 +1803,10 @@ event_registered = GLOBUS_TRUE; } - else if(request->two_phase_commit == 0) - { - /* Nothing to do here if we are not doing the two-phase - * commit protocol + else if(request->two_phase_commit == 0 || !request->client_contacts) + { + /* Nothing to do here if we are not doing the two-phase + * commit protocol or if we have no client callbacks */ if(request->jobmanager_state == GLOBUS_GRAM_JOB_MANAGER_STATE_TWO_PHASE_END) @@ -2411,11 +2148,6 @@ break; } - /* - * To do a two-phase commit, we need to send an error - * message (WAITING_FOR_COMMIT) in the initial reply; otherwise, - * we just return the current status code. - */ if(request->unsent_status_change) { if(request->job_history_status != request->status) @@ -2428,7 +2160,13 @@ request->unsent_status_change = GLOBUS_FALSE; } - if(request->two_phase_commit != 0) + /* + * If there are no client callbacks then skip the two phase end + * commit delay, since there is nobody listening to the state + * changes to send the commit. + */ + + if(request->two_phase_commit != 0 && request->client_contacts) { GlobusTimeReltimeSet(delay_time, request->two_phase_commit, 0);