mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-07 17:40:25 +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(cli_ver < ver) { //need to send a new kanban
|
||||
closeFile(fp);
|
||||
timer->is_open = 0;
|
||||
return sendAll(kanban_path, timer);
|
||||
}
|
||||
}
|
||||
@@ -332,6 +333,8 @@ void acceptClient() {
|
||||
timer->thread = &accept_threads[p];
|
||||
timer->touch = time(NULL);
|
||||
timer->data = NULL;
|
||||
timer->is_open = 0;
|
||||
timer->fp = NULL;
|
||||
if (pthread_create(timer->thread, NULL, (void *)&handleAccept, timer)) puts("Error creating thread");
|
||||
else puts("Creating thread succeeded");
|
||||
} else puts("Allocate timer error");
|
||||
|
||||
Reference in New Issue
Block a user