summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rest.c b/src/rest.c
index 5045dc6..ae4c44d 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -2075,6 +2075,9 @@ static int og_cmd_setup(json_t *element, struct og_msg_params *params)
json_object_foreach(element, key, value) {
if (!strcmp(key, "clients")) {
err = og_json_parse_clients(value, params);
+ } else if (!strcmp(key, "type")) {
+ err = og_json_parse_string(value, &params->type);
+ params->flags |= OG_REST_PARAM_TYPE;
} else if (!strcmp(key, "disk")) {
err = og_json_parse_string(value, &params->disk);
params->flags |= OG_REST_PARAM_DISK;
@@ -2093,6 +2096,7 @@ static int og_cmd_setup(json_t *element, struct og_msg_params *params)
}
if (!og_msg_params_validate(params, OG_REST_PARAM_ADDR |
+ OG_REST_PARAM_TYPE |
OG_REST_PARAM_DISK |
OG_REST_PARAM_CACHE |
OG_REST_PARAM_CACHE_SIZE |