Changeset - a406b67ddc62
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-31 23:56:15

Removed unneeded \"key\" variable
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -91,7 +91,6 @@ key = NULL;
 
cfg_t * my_cfg;
 
cfg_opt_t myopts[] = {
 
		CFG_SIMPLE_STR("username", &username),
 
		CFG_SIMPLE_STR("key", &key),
 
		CFG_END()
 
		};
 
struct options_common *commonopts;
 
@@ -100,10 +99,10 @@ options_init(argc,argv,&my_cfg, myopts, 
 

	
 

	
 
/* If there's no key or username in the conf, or if they're at the default (!key/!username) let the user know! */
 
	if(key == NULL || username == NULL || strcmp(key, "!key") == 0 || strcmp(username, "!username") == 0 ){
 
	if(username == NULL || strcmp(username, "!username") == 0 ){
 
	  fprintf(stderr, "\nYou didn't register!\nPlease register or edit your config. (see -h)\nIf this error persists, check distrenslave.conf to ensure all items are filled.\n");
 
	}
 
	else if((key != NULL && username != NULL) || (key != "!key" && username != "username") ){
 
	else if( username != NULL || strcmp(username,"!username") != 0 ){
 
		fprintf(stderr, "Your username is %s, and your key is %s.\n",username, key);
 
		// Logs ya in:
 
		if(login_user(username) == 1){
0 comments (0 inline, 0 general)