forked from github/abduco
commit-fix: RV_DETACH in client.c; if is now switch
This commit is contained in:
parent
6c6b505327
commit
64d897db14
15
client.c
15
client.c
|
|
@ -123,12 +123,13 @@ static int client_mainloop(void) {
|
||||||
debug("client-stdin: %c\n", pkt.u.msg[0]);
|
debug("client-stdin: %c\n", pkt.u.msg[0]);
|
||||||
if (client.await_command) {
|
if (client.await_command) {
|
||||||
client.await_command = false;
|
client.await_command = false;
|
||||||
if (pkt.u.msg[0]=='d') {
|
switch (pkt.u.msg[0]) {
|
||||||
pkt.type = MSG_DETACH;
|
case 'd':
|
||||||
pkt.len = 0;
|
pkt.type = MSG_DETACH;
|
||||||
client_send_packet(&pkt);
|
pkt.len = 0;
|
||||||
close(server.socket);
|
client_send_packet(&pkt);
|
||||||
return -1;
|
close(server.socket);
|
||||||
|
return RV_DETACH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pkt.len = len;
|
pkt.len = len;
|
||||||
|
|
@ -141,7 +142,7 @@ static int client_mainloop(void) {
|
||||||
}
|
}
|
||||||
} else if (len == 0) {
|
} else if (len == 0) {
|
||||||
debug("client-stdin: EOF\n");
|
debug("client-stdin: EOF\n");
|
||||||
return -1;
|
return RV_DETACH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue