mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-26 22:20:28 +08:00
尝试修复文件问题
This commit is contained in:
3
server.c
3
server.c
@@ -169,6 +169,7 @@ int s1_get(THREADTIMER *timer) { //get kanban
|
|||||||
if(sscanf(timer->data, "%u", &cli_ver) > 0) {
|
if(sscanf(timer->data, "%u", &cli_ver) > 0) {
|
||||||
if(cli_ver < ver) { //need to send a new kanban
|
if(cli_ver < ver) { //need to send a new kanban
|
||||||
closeFile(fp);
|
closeFile(fp);
|
||||||
|
timer->is_open = 0;
|
||||||
return sendAll(kanban_path, timer);
|
return sendAll(kanban_path, timer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -332,6 +333,8 @@ void acceptClient() {
|
|||||||
timer->thread = &accept_threads[p];
|
timer->thread = &accept_threads[p];
|
||||||
timer->touch = time(NULL);
|
timer->touch = time(NULL);
|
||||||
timer->data = NULL;
|
timer->data = NULL;
|
||||||
|
timer->is_open = 0;
|
||||||
|
timer->fp = NULL;
|
||||||
if (pthread_create(timer->thread, NULL, (void *)&handleAccept, timer)) puts("Error creating thread");
|
if (pthread_create(timer->thread, NULL, (void *)&handleAccept, timer)) puts("Error creating thread");
|
||||||
else puts("Creating thread succeeded");
|
else puts("Creating thread succeeded");
|
||||||
} else puts("Allocate timer error");
|
} else puts("Allocate timer error");
|
||||||
|
|||||||
Reference in New Issue
Block a user