diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-09-28 23:05:38 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-09-30 14:41:49 +0200 |
commit | 760a82af2ced2365a8626af146ff2668b806c62f (patch) | |
tree | af8bba861ddcd84d6d2d48f5063861e536a6604e /src/client.c | |
parent | 491bf6f5e9f5c6dde5d9d1ae26d0392ec247cb9d (diff) |
rest: remove unused probe
unused since 87be2ce08
Diffstat (limited to 'src/client.c')
-rw-r--r-- | src/client.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/client.c b/src/client.c index 6e568b5..5842372 100644 --- a/src/client.c +++ b/src/client.c @@ -168,40 +168,6 @@ static int og_resp_early_hints(struct og_client *cli, json_t *data) return -1; } -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; - - if (json_typeof(data) != JSON_OBJECT) - return -1; - - json_object_foreach(data, key, value) { - if (!strcmp(key, "status")) { - 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; - } - } - - if (!strcmp(status, "BSY")) - cli->status = OG_CLIENT_STATUS_BUSY; - else if (!strcmp(status, "OPG")) - cli->status = OG_CLIENT_STATUS_OGLIVE; - else if (!strcmp(status, "VDI")) - cli->status = OG_CLIENT_STATUS_VIRTUAL; - - return status ? 0 : -1; -} - static int og_resp_shell_run(struct og_client *cli, json_t *data) { const char *cmd = NULL, *output = NULL; @@ -1387,9 +1353,6 @@ int og_agent_state_process_response(struct og_client *cli) } switch (cli->last_cmd) { - case OG_CMD_PROBE: - err = og_resp_probe(cli, root); - break; case OG_CMD_SHELL_RUN: err = og_resp_shell_run(cli, root); break; |