X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fserver.c;h=bd30f64b72f2a300f324abbf613d388ad82d3530;hb=f6115845375d1a0bc605df690ebcd728db995bb6;hp=63e3a609231a6dac52298a1cb4620a959b2b04ac;hpb=61796c2ba4e250181d6f88b0e19b6c5cbc73516e;p=silc.git diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 63e3a609..bd30f64b 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -4477,7 +4477,6 @@ void silc_server_save_users_on_channel(SilcServer server, SilcClientEntry client; SilcIDCacheEntry cache; SilcChannelClientEntry chl; - bool global; SILC_LOG_DEBUG(("Start")); @@ -4499,17 +4498,15 @@ void silc_server_save_users_on_channel(SilcServer server, continue; } - global = FALSE; + cache = NULL; /* Check if we have this client cached already. */ client = silc_idlist_find_client_by_id(server->local_list, client_id, server->server_type, &cache); - if (!client) { + if (!client) client = silc_idlist_find_client_by_id(server->global_list, client_id, server->server_type, &cache); - global = TRUE; - } if (!client) { /* If router did not find such Client ID in its lists then this must be bogus client or some router in the net is buggy. */ @@ -4531,13 +4528,10 @@ void silc_server_save_users_on_channel(SilcServer server, } client->data.status |= SILC_IDLIST_STATUS_REGISTERED; - } else { - /* Found, if it is from global list we'll assure that we won't - expire it now that the entry is on channel. */ - if (global) - cache->expire = 0; } + if (cache) + cache->expire = 0; silc_free(client_id); if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED)) {