From 9d743f3044bd5623508b2486d9bc6b2a725558fa Mon Sep 17 00:00:00 2001 From: bogd Date: Thu, 12 Oct 2023 11:51:52 +0200 Subject: [PATCH] remove unused properties from cron type structure --- include/CronTimers.h | 2 -- src/RestApiHandler.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/include/CronTimers.h b/include/CronTimers.h index 83034b7..200e1f8 100644 --- a/include/CronTimers.h +++ b/include/CronTimers.h @@ -51,8 +51,6 @@ typedef struct bool enab; /*!< Enable scheduler */ bool prev; /*!< Enable to execute nearest in the past sheduled action */ char name[TIMER_NAME_LENGTH]; /*!< Human readable name of scheduler */ - int obj; /*!< Index of object scheduler affected on */ - int act; /*!< Index of action with the object*/ char cron[TIMER_CRONSTRING_LENGTH]; /*!< Cron expression */ char exec[TIMER_EXECSTRING_LENGTH]; /*!< Cron command string */ diff --git a/src/RestApiHandler.c b/src/RestApiHandler.c index cfbff06..04306a4 100644 --- a/src/RestApiHandler.c +++ b/src/RestApiHandler.c @@ -295,8 +295,6 @@ static void funct_cronrecs(char *argres, int rw) T.enab = jRead_int(argres, "[*{'enab'", &i); T.prev = jRead_int(argres, "[*{'prev'", &i); jRead_string(argres, "[*{'name'", T.name, sizeof(T.name), &i); - T.obj = jRead_int(argres, "[*{'obj'", &i); - T.act = jRead_int(argres, "[*{'act'", &i); jRead_string(argres, "[*{'cron'", T.cron, sizeof(T.cron), &i); jRead_string(argres, "[*{'exec'", T.exec, sizeof(T.exec), &i); memcpy(&GetSysConf()->Timers[T.num - 1], &T, sizeof(cron_timer_t)); @@ -318,8 +316,6 @@ static void funct_cronrecs(char *argres, int rw) jwObj_int(&jwc, "enab", (T.enab) ? 1 : 0); jwObj_int(&jwc, "prev", (T.prev) ? 1 : 0); jwObj_string(&jwc, "name", T.name); - jwObj_int(&jwc, "obj", (unsigned int) T.obj); - jwObj_int(&jwc, "act", (unsigned int) T.act); jwObj_string(&jwc, "cron", T.cron); jwObj_string(&jwc, "exec", T.exec); jwEnd(&jwc);