mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 21:18:13 +08:00
解决警告
This commit is contained in:
@@ -91,15 +91,6 @@ void GetPraFromUrl(char* url, char* pra, char* val)
|
||||
|
||||
static int HttpGetIndexPage(httpd_request_t *req)
|
||||
{
|
||||
char* buf = "1678369623 4 0";
|
||||
pTimedTask task = (pTimedTask)malloc(sizeof(struct TimedTask));
|
||||
sscanf(buf, "%ld %d %d", &task->prs_time, &task->socket_idx, &task->on);
|
||||
AddTask(task);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OSStatus err = kNoErr;
|
||||
|
||||
err = httpd_send_all_header(req, HTTP_RES_200, sizeof(web_index_html), HTTP_CONTENT_HTML_ZIP);
|
||||
|
||||
@@ -107,7 +107,7 @@ char* GetTaskStr()
|
||||
tm_info = localtime(&prs_time);
|
||||
strftime(buffer, 26, "%m-%d %H:%M:%S", tm_info);
|
||||
|
||||
sprintf(tmp_str, "{'timestamp':%d,'prs_time':'%s','socket_idx':%d,'on':%d},",
|
||||
sprintf(tmp_str, "{'timestamp':%ld,'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