Changeset - 45bbc99ffe99
[Not reviewed]
default
0 2 0
ethanzonca - 16 years ago 2009-07-31 19:43:09

Made conf_replace() returnable
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -191,25 +191,25 @@ int login_user(char *username)
 
    {
 
      if(readlen > 9) {
 
	fprintf(stderr, "!!!! Something is terribly wrong!\n");
 
      }
 
    buf[readlen] = '\0';
 
    fprintf(stderr, "read \"%s\"\n", buf);
 
    }
 
  execio_close(testrem);
 
  return 1; // 1 can be like... error-free login...
 
}
 

	
 
/** Replaces username and key in the slave's conf file */
 
void conf_replace(char *username){
 
int conf_replace(char *username){
 
  /* Note: SYSCONFDIR doesn't include a trailing slash */
 
  int maxlinelen = 120;
 
  char *fileOrig = SYSCONFDIR "/distrenslave.conf";
 
  char *fileRepl = SYSCONFDIR "/distrenslave.conf.edited";
 
  char *text2find = "!username";
 
  char *text2repl = username;
 
  char buffer[maxlinelen+2];
 
  char *buff_ptr, *find_ptr;
 
  FILE *fp1, *fp2;
 
  size_t find_len = strlen(text2find);
 
  fp1 = fopen(fileOrig,"r");
 
  fp2 = fopen(fileRepl,"w");
src/server/slavefuncs.h
Show inline comments
 
@@ -15,17 +15,17 @@
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#ifndef _DISTREN_SLAVEFUNCS_H
 
#define _DISTREN_SLAVEFUNCS_H
 
#include "blendjob.h"
 

	
 
int ssh_keygen();
 
int register_user(char *username, char *email);
 
int login_user(char *username);
 
void conf_replace(char *username);
 
int conf_replace(char *username);
 
void exec_blender(struct blendjob* blendjob, char *input, char *output, int frame);
 

	
 

	
 
#endif
0 comments (0 inline, 0 general)