Changeset - b50933ddbb8f
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-08-03 22:22:22

Why was this only a warning before, and an error now? Anyway, fixed.
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -29,24 +29,28 @@
 

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

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

	
 
/** Stub stub stubbiness ugh */
 
void tell_the_server(char *stuff){
 
}
 

	
 
/** Function referenced by curlget() to write data to disk. */
 
size_t curl_writetodisk(void *ptr, size_t size, size_t nmemb, FILE *stream)
 
 {
 
    return fwrite(ptr, size, nmemb, stream);
 
  }
 

	
 
/** Gets a URL with cURL and saves it to disk */
 
int curlget(char *url, char *out){
 
  CURL *curl;
 
  CURLcode res;
 
  FILE *outfile;
 

	
 
@@ -306,29 +310,29 @@ return 1; // Success
 

	
 
/* Executors */
 

	
 
/*
 
  It seems that the client will need to know the job number. fixme.
 
*/
 

	
 
/** Executor function for Blender operations */
 
void exec_blender(struct blendjob* blendjob, char *input, char *output, int frame)
 
{
 
  int ret;
 
  char *frame_str;
 
  
 

	
 
  /* start execio code */
 
  char *command = "blender"; // @TODO: append .exe if win32?
 
  char *cmd[] = { command, "-b", "-o", output, input, "-f", frame_str, (char *)NULL };
 
  
 

	
 
  char buf[10];
 
  struct execio *testrem;
 
  size_t readlen;
 

	
 
  _distren_asprintf(&frame_str, "%i", frame);
 

	
 
  ret = execio_open(&testrem, command, cmd); // This path will be absolute for testing, should be relative to install on production
 
  buf[9] = '\0'; // null-terminating the array...
 
  while(!execio_read(testrem, buf, 9, &readlen))
 
  	    {
 
  	      if(readlen > 9) {
 
  		fprintf(stderr, "Something is terribly wrong!\n");
0 comments (0 inline, 0 general)