Changeset - 6015db8cc605
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-25 16:44:09

Bug squashing. Any/all remaining bugs are due to placeholder remoteio code for client/server communication, or variables that will be filled by client/server communication.
1 file changed with 10 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -72,13 +72,13 @@ char *key;
 
username = NULL;
 
key = NULL;
 
cfg_t * my_cfg;
 
cfg_opt_t myopts = {
 
		CFG_SIMPLE_STR("username"), &username),
 
		CFG_SIMPLE_STR("key"), &key),
 
cfg_opt_t myopts[] = {
 
		CFG_SIMPLE_STR("username", &username),
 
		CFG_SIMPLE_STR("key", &key),
 
		CFG_END()
 
		};
 
struct options_common *commonopts
 
options_init(argc,argv,&my_cfg, &myopts, "slave", &commonopts);
 
struct options_common *commonopts;
 
options_init(argc,argv,&my_cfg, myopts, "slave", &commonopts);
 
/* End option getter */
 

	
 

	
 
@@ -100,18 +100,18 @@ 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.
 
				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.
 
		slavestatus=2; // When done rendering, set this.
 
	}
 
	if(SLAVESTATUS==2){
 
	if(slavestatus==2){
 
		fprintf(stderr, "Finished frame %d in job %d",framenum,jobnum);
 
		SLAVESTATUS=0;
 
		slavestatus=0;
 
	}
 
	if(SLAVESTATUS==0){
 
	if(slavestatus==0){
 
		tell_the_server(DISTREN_REQUEST_DONEFRAME);
 
		fprintf(stderr, "Idle. No frames to render.");
 
	}
0 comments (0 inline, 0 general)