X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fpacket_receive.c;h=c0bda1432fee1a80bf82967dcf251b208ac041f0;hb=1c541e578777af1f94fd0e53b608cf7c0f5bdaeb;hp=2068c18bdf8219b817f6efa9e57d528f6ba5cc76;hpb=e6639fb0b29d395f7512279aeea5c256bdbafbc4;p=silc.git diff --git a/apps/silcd/packet_receive.c b/apps/silcd/packet_receive.c index 2068c18b..c0bda143 100644 --- a/apps/silcd/packet_receive.c +++ b/apps/silcd/packet_receive.c @@ -43,7 +43,7 @@ void silc_server_notify(SilcServer server, SilcClientEntry client = NULL, client2 = NULL; SilcServerEntry server_entry = NULL; SilcChannelClientEntry chl; - SilcIDCacheEntry cache; + SilcIDCacheEntry cache = NULL; SilcHashTableList htl; SilcUInt32 mode; unsigned char *tmp; @@ -166,11 +166,11 @@ void silc_server_notify(SilcServer server, entry for the client. */ client = silc_idlist_find_client_by_id(server->global_list, client_id, server->server_type, - NULL); + &cache); if (!client) { client = silc_idlist_find_client_by_id(server->local_list, client_id, server->server_type, - NULL); + &cache); if (!client) { /* If router did not find the client the it is bogus */ if (server->server_type != SILC_SERVER) { @@ -239,6 +239,10 @@ void silc_server_notify(SilcServer server, channel->user_count++; channel->disabled = FALSE; + /* Make sure we don't expire clients that are on channel */ + if (cache) + cache->expire = 0; + /* Update statistics */ if (server->server_type == SILC_ROUTER) { if (sock->type != SILC_SOCKET_TYPE_ROUTER)