mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-05 00:10:29 +08:00
fix null get
This commit is contained in:
8
server.c
8
server.c
@@ -569,8 +569,16 @@ static int s1_get(threadtimer_t *timer) { //get kanban
|
||||
int r = close_file_and_send(timer, "null", 4);
|
||||
if(strstr(timer->data, "quit")) {
|
||||
puts("Found last cmd is quit");
|
||||
timer->numbytes = 0;
|
||||
return 0;
|
||||
}
|
||||
int i = 0;
|
||||
for(; i < timer->numbytes; i++) {
|
||||
if(!isdigit(timer->data[i])) {
|
||||
timer->numbytes -= i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user