This commit is contained in:
zogodo
2020-05-05 20:32:49 +08:00
parent 526c7b77dc
commit d0a9f2ea84
4 changed files with 4039 additions and 3996 deletions

View File

@@ -338,6 +338,7 @@ static int HttpAddTask(httpd_request_t *req)
int re = sscanf(buf, "%ld %d %d %d", &task->prs_time, &task->socket_idx, &task->on, &task->weekday); int re = sscanf(buf, "%ld %d %d %d", &task->prs_time, &task->socket_idx, &task->on, &task->weekday);
http_log("AddTask buf[%s] re[%d] (%ld %d %d %d)", http_log("AddTask buf[%s] re[%d] (%ld %d %d %d)",
buf, re, task->prs_time, task->socket_idx, task->on, task->weekday); buf, re, task->prs_time, task->socket_idx, task->on, task->weekday);
task->socket_idx--;
if (task->prs_time < 1577428136 || task->prs_time > 9577428136 if (task->prs_time < 1577428136 || task->prs_time > 9577428136
|| task->socket_idx < 0 || task->socket_idx > 5 || task->socket_idx < 0 || task->socket_idx > 5
|| (task->on != 0 && task->on != 1)) || (task->on != 0 && task->on != 1))

File diff suppressed because it is too large Load Diff

View File

@@ -67,7 +67,7 @@ void SetSocketStatus(char* socket_status)
*/ */
void UserRelaySet(unsigned char i, unsigned char on) void UserRelaySet(unsigned char i, unsigned char on)
{ {
if (i >= SOCKET_NUM) return; if (i < 0 || i >= SOCKET_NUM) return;
if (on == Relay_ON) if (on == Relay_ON)
{ {