From: Nishi Date: Fri, 11 Oct 2024 21:08:15 +0000 (+0000) Subject: fix X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1d29e216143f6deceaf7192cdb771360fa3c3b1e;p=rbuild.git fix git-svn-id: file:///raid/svn-personal/rbuild/trunk@14 c68d3453-7f82-0740-9748-1d72386a946b --- diff --git a/Server/server.c b/Server/server.c index c21e354..e838fbc 100644 --- a/Server/server.c +++ b/Server/server.c @@ -214,6 +214,8 @@ void rbs_server_handler(void* sockptr) { } else if(strcmp(cmd, "CC") == 0 && arg != NULL && authed) { if(rbs_task(sock, section, cmd, arg)) { rbs_write(sock, "SUCCESS\n", 8); + free(line); + break; } else { rbs_write(sock, "FAIL\n", 5); free(line); diff --git a/Server/task.c b/Server/task.c index 882bc5d..c8efe54 100644 --- a/Server/task.c +++ b/Server/task.c @@ -69,9 +69,6 @@ char** rbs_parse_args(const char* cmd, const char* arg) { } } free(str); - for(i = 0; stack[i] != NULL; i++) { - printf("[%s]\n", stack[i]); - } return stack; } @@ -105,6 +102,7 @@ CMBOOL rbs_wait_process(int sock) { int len = read(outpipe[0], &c, 1); if(len <= 0) break; if(c == '\n') { + if(oldc == '\n') rbs_write(sock, "+", 1); rbs_write(sock, "\n", 1); } else { if(oldc == '\n') rbs_write(sock, "+", 1);