summaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client.c b/src/client.c
index fcf3cbf..c21c373 100644
--- a/src/client.c
+++ b/src/client.c
@@ -28,6 +28,7 @@ static int og_resp_probe(struct og_client *cli, json_t *data)
{
const char *status = NULL;
const char *key;
+ uint32_t speed;
json_t *value;
int err = 0;
@@ -39,6 +40,11 @@ static int og_resp_probe(struct og_client *cli, json_t *data)
err = og_json_parse_string(value, &status);
if (err < 0)
return err;
+ } else if (!strcmp(key, "speed")) {
+ err = og_json_parse_uint(value, &speed);
+ if (err < 0)
+ return err;
+ cli->speed = speed;
} else {
return -1;
}