summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-04 18:29:13 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-04 18:29:15 +0200
commitd3e9b5727ae28885f1af1c8bd5a40a1ed238120d (patch)
treee88f2ed6fdfadd59108b5778bcf38cff0b3166d8 /src
parent40d4279b316e9d8b6636dd518cddec65b78c05aa (diff)
#980 ignore unknown attributes
If ogClient sends an unknown attribute, ignore it.
Diffstat (limited to 'src')
-rw-r--r--src/client.c14
1 files changed, 0 insertions, 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;