summaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-11-16 12:41:14 +0100
committerJose M. Guisado <jguisado@soleta.eu>2021-11-17 10:36:50 +0100
commitb6b1040997372eee9b0fcaa59aae207f8df78114 (patch)
treef504cc0dd4c2162ea86993594b25c84c3ec9b031 /src/client.c
parent5a3fd51261b40196dca461798ff4ca50417e0c75 (diff)
#1065 client: add support for ogclient win state
ogClient can be run in windows mode, enabling connection with ogServer when running on a Windows machine. Don't expect the same payload in windows mode as a in live or virtual. Client in windows mode does not send partition setup information, only the status/state. (same case for linux mode)
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client.c b/src/client.c
index 5befa9c..6c5743f 100644
--- a/src/client.c
+++ b/src/client.c
@@ -313,8 +313,12 @@ static int og_resp_refresh(json_t *data, struct og_client *cli)
return err;
}
- if (status && !strncmp(status, "LINUX", strlen("LINUX"))) {
- cli->status = OG_CLIENT_STATUS_LINUX;
+ if (status) {
+ if (!strncmp(status, "LINUX", strlen("LINUX"))) {
+ cli->status = OG_CLIENT_STATUS_LINUX;
+ } else if (!strncmp(status, "WIN", strlen("WIN"))) {
+ cli->status = OG_CLIENT_STATUS_WIN;
+ }
return 0;
}