# HG changeset patch # User ethanzonca # Date 2009-09-26 02:25:46 # Node ID 27c9b4850828e045990815e03a0b2ae642fb0767 # Parent 6bad006318e5d00dd6e35e3560e95caeae7da9bb Fixed pseudo-code errors for tell_the_server diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -507,7 +507,7 @@ int main(int argc, char *argv[]) /* returnnum == 0 */ remotio_send_to_client(frame->num, job->jobnum); // Pseudo-sends data to client } - + int clientsays = 0; // @TODO: kill me /* If the client states that they finished the frame */ if(clientsays == DISTREN_REQUEST_DONEFRAME){ clientstatus = CLIENTSTATUS_IDLE; // Sets the client back to idle diff --git a/src/server/slave.c b/src/server/slave.c --- a/src/server/slave.c +++ b/src/server/slave.c @@ -215,7 +215,7 @@ if(gotframe ==1) // Consider placing the following in the exec_blender() function while(busy == 1){ - tell_the_server("DISTREN_REQUEST_PROGRESS"); + tell_the_server(DISTREN_REQUEST_PROGRESS); fprintf(stderr, "Rendering frame %d in job %d...",framenum,jobnum); sleep(5); // or not... this should be more event-driven, but should still give a heartbeat to the server } @@ -228,8 +228,7 @@ if(gotframe ==1) char *outputurl; _distren_asprintf(&outputurl, "http://protofusion.org/distren/stor/job%d/",jobnum); // Aggregates the output url curlpost(pathtoOutput, urltoOutput); // uploads (HTML POST) the output at outputpath to the server at outputurl - tell_the_server("DISTREN_REQUEST_DONEFRAME" - ); // Tells the server that it's finished rendering this frame + tell_the_server(DISTREN_REQUEST_DONEFRAME); // Tells the server that it's finished rendering this frame busy=0; // Slave now becomes idle, doesn't need to tell the server anything, ssh handles this. } diff --git a/src/server/slavefuncs.c b/src/server/slavefuncs.c --- a/src/server/slavefuncs.c +++ b/src/server/slavefuncs.c @@ -74,7 +74,7 @@ int delete_jobdata(int jobnum, char *dat } /** Stub stub stubbiness ugh @TODO: Kill me. */ -void tell_the_server(char *stuff){ +void tell_the_server(int stuff){ } /** Function referenced by curlget() to write data to disk. */ diff --git a/src/server/slavefuncs.h b/src/server/slavefuncs.h --- a/src/server/slavefuncs.h +++ b/src/server/slavefuncs.h @@ -26,7 +26,7 @@ #include xmlNodePtr xml_quickxpath(xmlXPathContextPtr xpathctxt, xmlChar *path); -void tell_the_server(char *stuff); +void tell_the_server(int stuff); int delete_jobdata(int jobnum, char *datadir); size_t curl_writetodisk(void *ptr, size_t size, size_t nmemb, FILE *stream); int curlget(char *url, char *out);