Changeset - 5b5bb72840e6
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-09-13 16:46:20
ohnobinki@ohnopublishing.net
fix up main() for dummy linkedlist head
1 file changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -577,15 +577,13 @@ int main(int argc, char *argv[])
 

	
 
  /* @TODO: Put some arg-grabbing code here */
 

	
 
  struct distrenjob *head;
 
  head->priority = 0; // make head have the highest priority
 
  struct distrenjob head;
 
  head.priority = 0; // make head have the highest priority
 

	
 
  int cont;
 
  struct distrend_listenset *listenset;
 
  struct distrend_config *config;
 

	
 
  start_data(); // Starts fresh or loads data from xml dump. Should we grab the return?
 

	
 
  enum clientstatus
 
  {
 
    CLIENTSTATUS_UNINITIALIZED = 0,
 
@@ -593,8 +591,10 @@ int main(int argc, char *argv[])
 
    CLIENTSTATUS_IDLE = 2
 
  } clientstatus;
 

	
 
  head = NULL;
 
  cont = 1;
 
  memset(&head, '\0', sizeof(struct distrenjob));
 

	
 
  start_data(); // Starts fresh or loads data from xml dump. Should we grab the return?
 

	
 
  distrend_do_config(argc, argv, &config);
 

	
 
@@ -610,7 +610,7 @@ int main(int argc, char *argv[])
 

	
 
      /* Make the following code more event-driven */
 
      status_report_generator(&head);
 
      blend_frame_watchdog(head);
 
      blend_frame_watchdog(&head);
 

	
 

	
 
      struct frameset *frame;
 
@@ -619,7 +619,7 @@ int main(int argc, char *argv[])
 
      /* If the client is idle, must be modified for climbing through linked list of clients (client->clientnum) */
 
      if(clientstatus == CLIENTSTATUS_IDLE)
 
	{
 
	  int returnnum = frame_finder(head, &job, &frame); // Finds a frame to render
 
	  int returnnum = frame_finder(&head, &job, &frame); // Finds a frame to render
 
	  if(returnnum)
 
	    {
 
	      fprintf(stderr,"No frames are available to render at this time. Idling...\n");
 
@@ -633,7 +633,7 @@ int main(int argc, char *argv[])
 
      /* If the client states that they finished the frame */
 
      	if(clientsays == DISTREN_REQUEST_DONEFRAME){
 
      	  clientstatus = CLIENTSTATUS_IDLE; // Sets the client back to idle
 
      	  finish_frame(head, frame->num); // @TODO: Check that finish_frame really gets the jobnum somehow
 
      	  finish_frame(&head, frame->num); // @TODO: Check that finish_frame really gets the jobnum somehow
 
      	}
 

	
 
      distrend_action_free(action);
0 comments (0 inline, 0 general)