mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-13 13:40:37 +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);
|
int r = close_file_and_send(timer, "null", 4);
|
||||||
if(strstr(timer->data, "quit")) {
|
if(strstr(timer->data, "quit")) {
|
||||||
puts("Found last cmd is quit");
|
puts("Found last cmd is quit");
|
||||||
|
timer->numbytes = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
int i = 0;
|
||||||
|
for(; i < timer->numbytes; i++) {
|
||||||
|
if(!isdigit(timer->data[i])) {
|
||||||
|
timer->numbytes -= i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user