Changeset - a04225d4bde8
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 16 years ago 2009-08-02 01:22:08
ohnobinki@ohnopublishing.net
removed all int_to_str()
2 files changed with 7 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -22,6 +22,7 @@
 
  * distrenslave -c username email@example.com
 
 */
 

	
 
#include "asprintf.h"
 
#include "slavefuncs.h"
 
#include "blendjob.h"
 
#include "execio.h"
 
@@ -109,12 +110,6 @@ int curlpost(char *filename, char *url){
 
  return 0;
 
}
 

	
 
/** Converts an integer to a string, currently a stub. */
 
char *int_to_str(int nbr)
 
{
 
 return(NULL);
 
}
 

	
 
/** Generates a SSH key with ssh-keygen */
 
int ssh_keygen(){
 
	/* Checks to see if the keys are already present. */
 
@@ -318,15 +313,19 @@ return 1; // Success
 
/** Executor function for Blender operations */
 
void exec_blender(struct blendjob* blendjob, char *input, char *output, int frame)
 
{
 
	char *frame_str = int_to_str(frame); // Converts the int frame to a string, so it can be in the cmd array.
 
  int ret;
 
  char *frame_str;
 
  
 
  /* start execio code */
 
  	char *command = "blender"; // @TODO: append .exe if win32?
 
  	int ret;
 
    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))
src/server/slavefuncs.h
Show inline comments
 
@@ -26,7 +26,6 @@
 
size_t curl_writetodisk(void *ptr, size_t size, size_t nmemb, FILE *stream);
 
int curlget(char *url, char *out);
 
int curlpost(char *filename, char *url);
 
char *int_to_str(int nbr);
 
int ssh_keygen();
 
int register_user(char *username, char *email);
 
int login_user(char *username);
0 comments (0 inline, 0 general)