Changeset - b76484bd4980
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-25 21:07:59
ohnobinki@ohnopublishing.net
fixed protocol symantecs
1 file changed with 6 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -105,22 +105,23 @@ options_init(argc,argv,&my_cfg, myopts, 
 
		exec('tar -xvf job#.tgz /tmp/distren/job#'); // somehow
 
		exec_blender("jobname.blendfile, jobnum.framenum.JPG, jobnum"); // (check the args, we'll need to adjust for different output formats, include this in the blendjob struct later)
 
			while('blender is running'){
 
				slavestatus=1; // really quite pointless now, but why not. Could be nice for logging.
 
				tell_the_server(DISTREN_REQUEST_PROGRESS);
 
				fprintf(stderr, "Rendering frame %d in job %d...",framenum,jobnum);
 
				delay(1000); // or not... this should be more event-driven, but should still give a heartbeat to the server
 
			}
 
		slavestatus=2; // When done rendering, set this.
 
	}
 
	if(slavestatus==2){
 
		fprintf(stderr, "Finished frame %d in job %d",framenum,jobnum);
 
		tell_the_server(DISTREN_FINISHED_ASSIGNMENT); // or implement this into the exec_X() functions, but that would be repetative
 
		tell_the_server(DISTREN_REQUEST_DONEFRAME); // or implement this into the exec_X() functions, but that would be repetative
 
		slavestatus=0;
 
	}
 
	if(slavestatus==0){
 
		tell_the_server(DISTREN_REQUEST_DONEFRAME);
 
		fprintf(stderr, "Idle. No frames to render.");
 
	}
 
	if(slavestatus==0)
 
	  {
 
	    fprintf(stderr, "Unreachable code");
 
	    abort();
 
	  }
 

	
 
  return 0;
 
}
0 comments (0 inline, 0 general)