This commit is contained in:
zogodo
2019-12-26 21:56:05 +08:00
parent 08b4dc8c35
commit 0a6f32c1ac
4 changed files with 12 additions and 11 deletions

View File

@@ -200,7 +200,7 @@ exit:
static int HttpGetTasks(httpd_request_t *req)
{
pTimedTask pt = (pTimedTask)malloc(sizeof(struct TimedTask));
pt->time = time(NULL) + 5;
pt->prs_time = time(NULL) + 5;
pt->socket_idx = 5;
pt->on = 0;
AddTask(pt);
@@ -220,7 +220,7 @@ static int HttpAddTask(httpd_request_t *req)
char buf[16] = "5 1234567 0"; //<2F><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>.
struct TimedTask task;
sscanf(buf, "%d %d %d", &task.time, &task.socket_idx, &task.on);
sscanf(buf, "%ld %d %d", &task.prs_time, &task.socket_idx, &task.on);
char* mess = AddTask(&task) ? "OK" : "NO";