opensync: Command_State now reflects command string as well

Fixes: WIFI-729
Signed-off-by: Ammad Rehmat <ammad.rehmat@connectus.ai>
This commit is contained in:
Ammad Rehmat 2020-09-10 16:18:52 -04:00 committed by John Crispin
parent 4c9a6686e8
commit 7aa405d4e1
2 changed files with 19 additions and 0 deletions

View File

@ -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": {

View File

@ -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);