mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 21:18:13 +08:00
非常傻的问题
This commit is contained in:
@@ -279,10 +279,10 @@ static int HttpDelTask(httpd_request_t *req)
|
|||||||
char* time_str = strstr(req->filename, "?time=");
|
char* time_str = strstr(req->filename, "?time=");
|
||||||
app_httpd_log("HttpDelTask url[%s] time_str[%s][%s]", req->filename, time_str, time_str + 6);
|
app_httpd_log("HttpDelTask url[%s] time_str[%s][%s]", req->filename, time_str, time_str + 6);
|
||||||
|
|
||||||
int time;
|
int time1;
|
||||||
sscanf(time_str + 6, "%d", &time);
|
sscanf(time_str + 6, "%d", &time1);
|
||||||
|
|
||||||
char* mess = DelTask(time) ? "OK" : "NO";
|
char* mess = DelTask(time1) ? "OK" : "NO";
|
||||||
|
|
||||||
OSStatus err = kNoErr;
|
OSStatus err = kNoErr;
|
||||||
send_http(mess, strlen(mess), exit, &err);
|
send_http(mess, strlen(mess), exit, &err);
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "mico.h"
|
|
||||||
#include "micokit_ext.h"
|
|
||||||
#include "sys/time.h"
|
|
||||||
|
|
||||||
#ifndef WEB_LOG_H
|
#ifndef WEB_LOG_H
|
||||||
#define WEB_LOG_H
|
#define WEB_LOG_H
|
||||||
@@ -26,7 +23,7 @@ char* GetLogRecord(int idx);
|
|||||||
|
|
||||||
#define web_log(format, ...) \
|
#define web_log(format, ...) \
|
||||||
LOG_TMP = (char*)malloc(sizeof(char)*LOG_LEN); \
|
LOG_TMP = (char*)malloc(sizeof(char)*LOG_LEN); \
|
||||||
now = 1234567; \
|
now = time(NULL); \
|
||||||
strftime(time_buf, TIM_LEN, "[%Y-%m-%d %H:%M:%S]", localtime(&now)); \
|
strftime(time_buf, TIM_LEN, "[%Y-%m-%d %H:%M:%S]", localtime(&now)); \
|
||||||
snprintf(LOG_TMP, LOG_LEN, "%s"format, time_buf, ##__VA_ARGS__); \
|
snprintf(LOG_TMP, LOG_LEN, "%s"format, time_buf, ##__VA_ARGS__); \
|
||||||
SetLogRecord(&log_record, LOG_TMP); \
|
SetLogRecord(&log_record, LOG_TMP); \
|
||||||
|
|||||||
Reference in New Issue
Block a user