Browse Source

Bugfix: RPC: Ensure isjoin always gets initialised

Luke Dashjr 12 years ago
parent
commit
a083331af2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      api.c

+ 2 - 2
api.c

@@ -4240,6 +4240,7 @@ void api(int api_thr_id)
 					applog(LOG_DEBUG, "API: recv command: (%d) '%s'", n, buf);
 					applog(LOG_DEBUG, "API: recv command: (%d) '%s'", n, buf);
 			}
 			}
 
 
+			firstjoin = isjoin = false;
 			if (!SOCKETFAIL(n)) {
 			if (!SOCKETFAIL(n)) {
 				// the time of the request in now
 				// the time of the request in now
 				when = time(NULL);
 				when = time(NULL);
@@ -4314,8 +4315,7 @@ void api(int api_thr_id)
 							quithere(1, "OOM cmdsbuf");
 							quithere(1, "OOM cmdsbuf");
 						strcpy(cmdsbuf, "|");
 						strcpy(cmdsbuf, "|");
 						param = NULL;
 						param = NULL;
-					} else
-						firstjoin = isjoin = false;
+					}
 
 
 					cmdptr = cmd;
 					cmdptr = cmd;
 					do {
 					do {