projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure client entry is not expired more than once
[silc.git]
/
apps
/
silcd
/
server.c
diff --git
a/apps/silcd/server.c
b/apps/silcd/server.c
index 73f363613f1a24ae59237900b29a411248142b12..aff2df5c1aeb8e710d0f852ea536cf2542d677b4 100644
(file)
--- a/
apps/silcd/server.c
+++ b/
apps/silcd/server.c
@@
-1263,13
+1263,10
@@
SILC_TASK_CALLBACK(silc_server_purge_expired_clients)
silc_dlist_start(server->expired_clients);
while ((client = silc_dlist_get(server->expired_clients))) {
silc_dlist_start(server->expired_clients);
while ((client = silc_dlist_get(server->expired_clients))) {
- if (client->data.status & SILC_IDLIST_STATUS_REGISTERED)
- continue;
-
/* For unregistered clients the created timestamp is actually
unregistered timestamp. Make sure client remains in history
at least 500 seconds. */
/* For unregistered clients the created timestamp is actually
unregistered timestamp. Make sure client remains in history
at least 500 seconds. */
- if (curtime - client->data.created < 500)
+ if (c
lient->data.created && c
urtime - client->data.created < 500)
continue;
id_list = (client->data.status & SILC_IDLIST_STATUS_LOCAL ?
continue;
id_list = (client->data.status & SILC_IDLIST_STATUS_LOCAL ?
@@
-3036,6
+3033,7
@@
void silc_server_free_client_data(SilcServer server,
client->router = NULL;
client->connection = NULL;
client->data.created = silc_time();
client->router = NULL;
client->connection = NULL;
client->data.created = silc_time();
+ silc_dlist_del(server->expired_clients, client);
silc_dlist_add(server->expired_clients, client);
} else {
/* Delete directly since we're shutting down server */
silc_dlist_add(server->expired_clients, client);
} else {
/* Delete directly since we're shutting down server */