diff options
author | Danny Holman <dholman@gymli.org> | 2023-07-25 12:46:08 -0500 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2023-07-25 12:46:08 -0500 |
commit | ee0f0f95d6972e66c56812e0e3abe9275d5f0fdc (patch) | |
tree | 32af37b710cc9e4e868e4394660e9fa65934ea9a /server | |
parent | 9761d54f75ea632a05a37c56f59d33f5b8459688 (diff) |
server: session: fix a session counting bug
Fix a bug in the num_sessions function in which the current active
session would not be counted.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'server')
-rw-r--r-- | server/src/session.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/session.c b/server/src/session.c index cc7d98c..d068d38 100644 --- a/server/src/session.c +++ b/server/src/session.c @@ -60,7 +60,7 @@ int num_alive_sessions(void) { struct list_head *temp = sessions.next; while (temp != NULL) { - if (container_of(temp, struct session, list)->alive == 1) + if (container_of(temp, struct session, list)->alive != 0) ret++; temp = temp->next; } |