diff options
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -65,7 +65,7 @@ struct ev_loop *og_loop; #define OG_REST_PARAM_SYNC_DIFF_NAME (1UL << 27) #define OG_REST_PARAM_SYNC_PATH (1UL << 28) #define OG_REST_PARAM_SYNC_METHOD (1UL << 29) -#define OG_REST_PARAM_ECHO (1UL << 30) +#define OG_REST_PARAM_INLINE (1UL << 30) #define OG_REST_PARAM_TASK (1UL << 31) #define OG_REST_PARAM_TIME_YEARS (1UL << 32) #define OG_REST_PARAM_TIME_MONTHS (1UL << 33) @@ -667,6 +667,7 @@ static int og_cmd_run_post(json_t *element, struct og_msg_params *params) { json_t *value, *clients; const char *key; + bool inline_cmd; int err = 0; if (json_typeof(element) != JSON_OBJECT) @@ -677,9 +678,9 @@ static int og_cmd_run_post(json_t *element, struct og_msg_params *params) err = og_json_parse_clients(value, params); else if (!strcmp(key, "run")) err = og_json_parse_run(value, params); - else if (!strcmp(key, "echo")) { - err = og_json_parse_bool(value, ¶ms->echo); - params->flags |= OG_REST_PARAM_ECHO; + else if (!strcmp(key, "inline")) { + err = og_json_parse_bool(value, &inline_cmd); + params->flags |= OG_REST_PARAM_INLINE; } if (err < 0) @@ -688,7 +689,7 @@ static int og_cmd_run_post(json_t *element, struct og_msg_params *params) if (!og_msg_params_validate(params, OG_REST_PARAM_ADDR | OG_REST_PARAM_RUN_CMD | - OG_REST_PARAM_ECHO)) + OG_REST_PARAM_INLINE)) return -1; clients = json_copy(element); |