Changeset - d6d0d0d26d0b
[Not reviewed]
default
0 5 0
Nathan Brink (binki) - 16 years ago 2009-11-27 13:00:57
ohnobinki@ohnopublishing.net
nuke global vars, order and fix #include-s
5 files changed with 25 insertions and 28 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -20,22 +20,22 @@
 

	
 
/* This file contains the code which both processes (renders) jobs as a slave, and the code which distributes frames to slaves after receiving them from the client portion of the codebase. */
 

	
 
#include "asprintf.h"
 
#include "distrenjob.h"
 
#include "execio.h"
 
#include "listen.h"
 
#include "options.h"
 
#include "distrenjob.h"
 
#include "listen.h"
 
#include "protocol.h"
 
#include "slavefuncs.h"
 
#include "asprintf.h"
 

	
 
#include <confuse.h>
 
#include <malloc.h>
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <malloc.h>
 
#include <unistd.h>
 
#include <string.h>
 
#include <sys/stat.h>
 
#include <time.h>
 
#include <sys/stat.h>
 
#include <string.h>
 
#include <unistd.h>
 

	
 
#include <libxml/xmlmemory.h>
 
#include <libxml/parser.h>
 
@@ -62,7 +62,8 @@ struct general_info {
 

	
 

	
 
/*
 
  internally defined funcs's prototypes @TODO: Make all functions nice and proper */
 
  internally defined funcs's prototypes @TODO: Make all functions nice and proper 
 
*/
 
void distrenjob_remove(struct distrenjob *head, struct distrenjob *bj);
 

	
 
struct distrenjob *distrenjob_get(struct distrenjob *head, jobnum_t jobnum);
 
@@ -77,12 +78,6 @@ void importGeneralInfo();
 
int updateJobStatsXML(struct distrenjob *job);
 

	
 

	
 
/* Global Vars, eliminate these */
 
jobnum_t jobnum = 0; // The next job number to create in the queue
 
int hcfjob; // Highest consecutively finished job
 
int highest_jobnum; // The job number of the most recently created job, this is used when creating new jobs
 

	
 

	
 
/* ********************** Functions ************************* */
 

	
 
/** Dumps all data in RAM to an xml file (such as current jobs, etc) which is parsed by start_data. Remember to invoke this before shutting down! */
 
@@ -146,7 +141,7 @@ int start_data(struct distrenjob *head, 
 
void finish_frame(struct distrenjob *head, struct distrenjob *distrenjob, int frame)
 
{
 
  distrenjob->frameset[frame].status = FRAMESETSTATUS_DONE;
 
  distrenjob->total_render_time = distrenjob->total_render_time + (clock() - distrenjob[jobnum].frameset[frame].start_time);
 
  distrenjob->total_render_time = distrenjob->total_render_time + (clock() - distrenjob->frameset[frame].start_time);
 
  distrenjob->completed_frames++;
 
  distrenjob->assigned_frames--;
 
  general_info.total_frames_rendered++; // Increase total frames var for stats
src/server/distrenjob.c
Show inline comments
 
@@ -16,12 +16,13 @@
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "asprintf.h"
 
#include "distrenjob.h"
 
#include "slavefuncs.h"
 
#include "asprintf.h"
 

	
 
#include <libxml/parser.h>
 
#include <libxml/tree.h>
 
#include <libxml/parser.h>
 

	
 
void distrenjob_free(struct distrenjob **distrenjob)
 
{
src/server/slave.c
Show inline comments
 
@@ -18,17 +18,17 @@
 

	
 
*/
 

	
 
#include "asprintf.h"
 
#include "protocol.h"
 
#include "options.h"
 
#include "remoteio.h"
 
#include "slavefuncs.h"
 
#include "asprintf.h"
 
#include "remoteio.h"
 

	
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <string.h>
 
#include <stdio.h>
 
#include <sys/stat.h>
 
#include <unistd.h>
 
#include <sys/stat.h>
 
#include <stdlib.h>
 

	
 
int main(int argc, char *argv[])
 
{
src/server/slavefuncs.c
Show inline comments
 
@@ -17,15 +17,15 @@
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "protocol.h"
 
#include "asprintf.h"
 
#include "slavefuncs.h"
 
#include "distrenjob.h"
 
#include "execio.h"
 
#include "protocol.h"
 
#include "slavefuncs.h"
 

	
 
#include <curl/curl.h>
 
#include <curl/easy.h>
 
#include <curl/types.h>
 
#include <curl/easy.h>
 

	
 
#include <stdio.h>
 
#include <string.h>
src/server/user_mgr.c
Show inline comments
 
@@ -17,13 +17,14 @@
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "user_mgr.h"
 
#include "malloc.h"
 
#include <string.h>
 
#include <malloc.h>
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <string.h>
 
#include <unistd.h>
 

	
 
#include "user_mgr.h"
 

	
 
struct user_mgr_info
 
{
 
	struct user *user_array;
0 comments (0 inline, 0 general)