From d3e9b5727ae28885f1af1c8bd5a40a1ed238120d Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Tue, 4 May 2021 18:29:13 +0200 Subject: #980 ignore unknown attributes If ogClient sends an unknown attribute, ignore it. --- src/client.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/client.c b/src/client.c index c21c373..0a2c33e 100644 --- a/src/client.c +++ b/src/client.c @@ -45,8 +45,6 @@ static int og_resp_probe(struct og_client *cli, json_t *data) if (err < 0) return err; cli->speed = speed; - } else { - return -1; } } @@ -77,8 +75,6 @@ static int og_resp_shell_run(struct og_client *cli, json_t *data) err = og_json_parse_string(value, &output); if (err < 0) return err; - } else { - return -1; } } @@ -127,8 +123,6 @@ static int og_resp_hardware(json_t *data, struct og_client *cli) err = og_json_parse_string(value, &hardware); if (err < 0) return -1; - } else { - return -1; } } @@ -193,8 +187,6 @@ static int og_resp_software(json_t *data, struct og_client *cli) err = og_json_parse_string(value, &software); else if (!strcmp(key, "partition")) err = og_json_parse_string(value, &partition); - else - return -1; if (err < 0) return -1; @@ -312,8 +304,6 @@ static int og_resp_refresh(json_t *data, struct og_client *cli) err = og_json_parse_partition_array(value, partitions); } else if (!strcmp(key, "serial_number")) { err = og_json_parse_string(value, &serial_number); - } else { - return -1; } if (err < 0) @@ -457,8 +447,6 @@ static int og_resp_image_create(json_t *data, struct og_client *cli) err = og_json_parse_string(value, &filesystem); else if (!strcmp(key, "datasize")) err = og_json_parse_uint64(value, &datasize); - else - return -1; if (err < 0) return err; @@ -558,8 +546,6 @@ static int og_resp_image_restore(json_t *data, struct og_client *cli) err = og_json_parse_string(value, &disk); else if (!strcmp(key, "image_id")) err = og_json_parse_string(value, &image_id); - else - return -1; if (err < 0) return err; -- cgit v1.2.3-18-g5258