Changeset - 6148c5ef5f33
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-10-10 00:41:59

put updateGeneralInfo() in 3 locations covering all spots where jobs and completed_frames are added and removed, and patched up an error or 2.
1 file changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -77,7 +77,7 @@ int makeJobDataXML(struct distrenjob *jo
 
int updateJobListXML(struct distrenjob *head);
 
int createQueueFromXML(struct distrenjob *head);
 
int reCreateQueueFromXML(struct distrenjob *head, xmlDocPtr doc, xmlNodePtr current);
 

	
 
void updateGeneralInfo();
 

	
 
/* Global Vars, eliminate these */
 
jobnum_t jobnum = 0; // The next job number to create in the queue
 
@@ -169,6 +169,8 @@ void finish_frame(struct distrenjob *hea
 
    {
 
      mortition(head, distrenjob);
 
    }
 

	
 
  updateGeneralInfo();
 
}
 

	
 
/** "mortition" check to see if a job is actually done by scanning the folder of the job to make sure all frames are present*/
 
@@ -187,6 +189,7 @@ void mortition(struct distrenjob *head, 
 
        {
 
          job->frameset[counter].status = FRAMESETSTATUS_UNASSIGNED;
 
          job->completed_frames--;
 
          general_info.total_frames_rendered--;
 
          isJobDone = 0; // if a missing frame is found, set isJobDone to false
 
        }
 
    }
 
@@ -201,6 +204,8 @@ void mortition(struct distrenjob *head, 
 
  else{
 
    job->prev_frame_index = 0; // if the job isn't done, have frame_finder() start from the first frame, allowing it to see the frames that are now unassigned
 
  }
 

	
 
  updateGeneralInfo();
 
}
 

	
 
/** scans the frames of a job to initialize a job after server */
 
@@ -259,9 +264,10 @@ void prepare_distrenjob(struct distrenjo
 
  /* add job to queue */
 
  makeJobDataXML(distrenjob);
 
  distrenjob_enqueue(head, distrenjob);
 
  updateJobListXML(head);
 

	
 
  general_info.jobs_in_queue++;
 
  updateJobListXML(head);
 
  updateGeneralInfo();
 
}
 

	
 

	
0 comments (0 inline, 0 general)