summaryrefslogtreecommitdiffstats
path: root/src/rest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rest.c')
-rw-r--r--src/rest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rest.c b/src/rest.c
index b96cf49..2a8b642 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -122,7 +122,7 @@ static struct og_client *og_client_find(const char *ip)
static const char *og_client_status(const struct og_client *cli)
{
- switch (cli->last_cmd) {
+ switch (cli->last_cmd.type) {
case OG_CMD_UNSPEC:
break;
default:
@@ -244,7 +244,7 @@ static bool og_client_is_busy(const struct og_client *cli,
case OG_CMD_STOP:
break;
default:
- if (cli->last_cmd != OG_CMD_UNSPEC)
+ if (cli->last_cmd.type != OG_CMD_UNSPEC)
return true;
break;
}
@@ -319,7 +319,7 @@ int og_send_request(enum og_rest_method method, enum og_cmd_type type,
if (send(client_sd, buf, strlen(buf), 0) < 0)
continue;
- cli->last_cmd = type;
+ cli->last_cmd.type = type;
}
json_decref((json_t *)data);
@@ -396,7 +396,7 @@ static int og_json_client_append(json_t *array, struct og_client *client)
}
json_object_set_new(object, "state", state);
json_object_set_new(object, "speed", json_integer(client->speed));
- last_cmd = og_json_client_cmd_result(client->last_cmd_result);
+ last_cmd = og_json_client_cmd_result(client->last_cmd.result);
json_object_set_new(object, "last_cmd", last_cmd);
json_array_append_new(array, object);