From 16baa885411d378b0b0bdd2a9f4e284b40a8f803 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Mon, 18 Nov 2024 10:09:08 +0100 Subject: refresh: update client login status from "status" field value Update the session status based on the value of the "status" field in the refresh response, the possible values are: LINUXS, LINUX, WINS, WIN. --- src/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/client.c') diff --git a/src/client.c b/src/client.c index 7e787e4..2fa5258 100644 --- a/src/client.c +++ b/src/client.c @@ -849,8 +849,12 @@ static int og_resp_refresh(json_t *data, struct og_client *cli) * client using linux/windows mode. */ if (status) { - if (!strncmp(status, "LINUX", strlen("LINUX"))) { + if (!strncmp(status, "LINUXS", strlen("LINUXS"))) { + cli->status = OG_CLIENT_STATUS_LINUX_SESSION; + } else if (!strncmp(status, "LINUX", strlen("LINUX"))) { cli->status = OG_CLIENT_STATUS_LINUX; + } else if (!strncmp(status, "WINS", strlen("WINS"))) { + cli->status = OG_CLIENT_STATUS_WIN_SESSION; } else if (!strncmp(status, "WIN", strlen("WIN"))) { cli->status = OG_CLIENT_STATUS_WIN; } -- cgit v1.2.3-18-g5258