Changeset - dc84f24b8ebb
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-15 19:47:45
ohnobinki@ohnopublishing.net
struct blendjob*-ized exec_blender
1 file changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -643,33 +643,36 @@ void loginuser(char *username){
 
  "username.rsa", // Key created from registeruser()
 
  "-p",
 
  "23",
 
  "echo",
 
  "hello", // This should eventually open a non-terminating connection to the server for communication
 
  (char *)NULL
 
  };
 
  size_t readlen;
 
  fprintf(stderr, "Opening stream:\n", execio_open(&testrem, "ssh", execargv));
 
  buf[9] = '\0'; // null-terminating the array...
 
  while(!execio_read(testrem, buf, 9, &readlen)) // What's with the readlen stuff?
 
    {
 
      if(readlen > 9) {
 
	fprintf(stderr, "!!!! Something is terribly wrong!\n");
 
      }
 
    buf[readlen] = '\0'; // Null-terminating the end of it again based on how large the data is?
 
    fprintf(stderr, "read \"%s\"\n", buf);
 
    }
 
  execio_close(testrem);
 
}
 

	
 

	
 
// Executors
 

	
 
// It seems that the client will need to know the job number. Is finish_frame going to be on the client or the server? we gotta figure that out!
 
void exec_blender(char *input, char *output, int frame, int jobnum) {
 
/*
 
  It seems that the client will need to know the job number. Is finish_frame going to be on the client or the server? we gotta figure that out!
 
*/
 
void exec_blender(struct blendjob* blendjob, char *input, char *output, int frame)
 
{
 
  char *frame_str;
 
  asprintf(frame,frame_str); // GNU/*nix compatible only, fix before releasing win32, although dll for windows for asprintf exists!
 
  int ret;
 
  char *cmd[] = { "blender", "-b", "-o", output, input, "-f", frame_str, (char *)0 };
 
  ret = execv("/usr/bin/blender", cmd);
 
  finish_frame(jobnum, frame);
 
  finish_frame(blendjob, frame);
 
}
0 comments (0 inline, 0 general)