From 7aa405d4e1b87a413d892fb8fcf856af5351b729 Mon Sep 17 00:00:00 2001 From: Ammad Rehmat Date: Thu, 10 Sep 2020 16:18:52 -0400 Subject: [PATCH] opensync: Command_State now reflects command string as well Fixes: WIFI-729 Signed-off-by: Ammad Rehmat --- .../opensync/patches/18-cmd-schema.patch | 18 ++++++++++++++++++ .../platform/openwrt/src/command/src/task.c | 1 + 2 files changed, 19 insertions(+) create mode 100644 feeds/wlan-ap/opensync/patches/18-cmd-schema.patch diff --git a/feeds/wlan-ap/opensync/patches/18-cmd-schema.patch b/feeds/wlan-ap/opensync/patches/18-cmd-schema.patch new file mode 100644 index 000000000..f1afc3b36 --- /dev/null +++ b/feeds/wlan-ap/opensync/patches/18-cmd-schema.patch @@ -0,0 +1,18 @@ +Index: opensync-2.0.5.0/interfaces/opensync.ovsschema +=================================================================== +--- opensync-2.0.5.0.orig/interfaces/opensync.ovsschema ++++ opensync-2.0.5.0/interfaces/opensync.ovsschema +@@ -8634,6 +8634,13 @@ + } + } + }, ++ "command": { ++ "type": { ++ "key": { ++ "type": "string" ++ } ++ } ++ }, + "state": { + "type": { + "key": { diff --git a/feeds/wlan-ap/opensync/src/platform/openwrt/src/command/src/task.c b/feeds/wlan-ap/opensync/src/platform/openwrt/src/command/src/task.c index d6d45a8ce..a5bb040a9 100644 --- a/feeds/wlan-ap/opensync/src/platform/openwrt/src/command/src/task.c +++ b/feeds/wlan-ap/opensync/src/platform/openwrt/src/command/src/task.c @@ -78,6 +78,7 @@ void task_status(struct task *task, int status, char *result) state.cmd_uuid_exists = true; state.cmd_uuid_present = true; SCHEMA_SET_INT(state.timestamp, task->conf.timestamp); + SCHEMA_SET_STR(state.command, task->conf.command); if (result) { STRSCPY(state.result_keys[0], "error"); STRSCPY(state.result[0], result);