mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-13 05:28:14 +08:00
删除定时任务失败
This commit is contained in:
@@ -93,7 +93,7 @@ bool DelTask(int time)
|
||||
|
||||
char* GetTaskStr()
|
||||
{
|
||||
char* str = (char*)malloc(sizeof(char)*(task_count*60+2));
|
||||
char* str = (char*)malloc(sizeof(char)*(task_count*80+2));
|
||||
pTimedTask tmp_tsk = task_top;
|
||||
char* tmp_str = str;
|
||||
tmp_str[0] = '[';
|
||||
@@ -107,8 +107,8 @@ char* GetTaskStr()
|
||||
tm_info = localtime(&prs_time);
|
||||
strftime(buffer, 26, "%m-%d %H:%M:%S", tm_info);
|
||||
|
||||
sprintf(tmp_str, "{'prs_time':'%s','socket_idx':%d,'on':%d},",
|
||||
buffer, tmp_tsk->socket_idx, tmp_tsk->on);
|
||||
sprintf(tmp_str, "{'timestamp':%d,'prs_time':'%s','socket_idx':%d,'on':%d},",
|
||||
tmp_tsk->prs_time, buffer, tmp_tsk->socket_idx, tmp_tsk->on);
|
||||
tmp_str += strlen(tmp_str);
|
||||
tmp_tsk = tmp_tsk->next;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user