summaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-18 10:09:08 +0100
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-18 10:09:08 +0100
commit16baa885411d378b0b0bdd2a9f4e284b40a8f803 (patch)
tree248a8d13b58ce31c78acaf758753f7e20c726d2a /src/client.c
parent4103945785011eb1a863e81bd4b37dec05fc8cdb (diff)
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.
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c6
1 files changed, 5 insertions, 1 deletions
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;
}