Changeset - 50ff9ed2fc39
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-09-18 00:08:24

consulting ohnobinki and normaldotcom I have changed mortition to use _distren_asprintf, in order to use that I have also added asprintf.c to the includes.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -25,6 +25,7 @@
 
#include "distrenjob.h"
 
#include "protocol.h"
 
#include "slavefuncs.h"
 
#include "asprintf.c"
 

	
 
#include <confuse.h>
 
#include <stdio.h>
 
@@ -160,13 +161,13 @@ void finish_frame(struct distrenjob *hea
 
void mortition(struct distrenjob *head, struct distrenjob *job){
 
  short int isJobDone;
 
  int counter;
 
  char path_and_number[20];
 
  char *path_and_number;
 
  struct stat buffer;
 

	
 
  isJobDone = 1; // set isJobDone to true
 
  for(counter = 0; counter < job->total_frames; counter++)
 
    {
 
      sprintf(path_and_number, "stor/job%d/out/%d.%s", job->jobnum, (counter + job->frameset[0].num), job->output_format);
 
      _distren_asprintf(&path_and_number, "stor/job%d/out/%d.%s", job->jobnum, job->frameset[counter].num, job->output_format);
 
      if(stat(path_and_number, &buffer) != -1)
 
        {
 
          job->frameset[counter].status = FRAMESETSTATUS_UNASSIGNED;
0 comments (0 inline, 0 general)