# HG changeset patch # User ethanzonca # Date 2009-07-25 16:44:09 # Node ID 6015db8cc6056fd2c6aea68b5f65b7057bf83e89 # Parent 58a86e0655cb24352c24e06f502fa31abad01bcf 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. diff --git a/src/server/slave.c b/src/server/slave.c --- a/src/server/slave.c +++ b/src/server/slave.c @@ -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."); }