Changeset - 3d6275c1cbe8
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-31 19:28:39

Patching things up...
1 file changed with 10 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -51,7 +51,7 @@ int ssh_keygen(){
 
	char buf[10];
 
	struct execio *testrem;
 
	size_t readlen;
 
	ret = execio_open(&testrem, "ssh", cmd); // This path will be absolute for testing, should be relative to install on production
 
	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))
 
	    {
 
@@ -242,19 +242,17 @@ void exec_blender(struct blendjob* blend
 
  char *frame_str;
 
  asprintf(frame,frame_str); // Converts the int frame to a string, so it can be in the cmd array. 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); // This path will be absolute for testing, should be relative to install on production
 

	
 
  /* start execio code */
 
  	char *command = "ssh-keygen"; // @TODO: append .exe if win32?
 
  	char *command = "blender"; // @TODO: append .exe if win32?
 
  	int ret;
 
  	char *cmd[] = { command, "-q", "-f", SYSCONFDIR "/distren.id_rsa", "-N", "", (char *)NULL }; // TODO: Give me the correct args!
 
    char *cmd[] = { command, "-b", "-o", output, input, "-f", frame_str, (char *)NULL };
 

	
 
  	char buf[10];
 
  	struct execio *testrem;
 
  	size_t readlen;
 
  	fprintf(stderr, "Opening stream:\n", execio_open(&testrem, "ssh", cmd)); // This path will be absolute for testing, should be relative to install on production
 
  	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))
 
  	    {
 
@@ -266,4 +264,10 @@ void exec_blender(struct blendjob* blend
 
  	    }
 
  	execio_close(testrem);
 
  /* end execio code */
 
  	if(ret == 1){
 
  		fprintf(stderr,"Error starting Blender. Check your install.");
 
  	}
 
  	else{
 
  		fprintf(stderr,"Blender at least started nicely, who knows if it rendered anything though.");
 
  	}
 
}
0 comments (0 inline, 0 general)