* Do not set to wait for backup in rehash of the server.
Affected file silcd/server.c.
+ * Do not check listener sockets when counting how many
+ socket connections we have. Affected file is
+ silcd/server_util.c.
+
+ * Do not announce disconnected clients that are remaining
+ in history (for WHOWAS). This is because SIGNOFF notify
+ for these has been sent earlier already. Affected file
+ silcd/server.c.
+
Thu Jun 27 20:07:27 EEST 2002 Pekka Riikonen <priikone@silcnet.org>
* Buffer overflow with CUMODE command's mode->mode character
if (!silc_idcache_del_by_context(id_list->clients, entry))
return FALSE;
+ assert(!silc_hash_table_count(entry->channels));
+
/* Free data */
silc_free(entry->nickname);
silc_free(entry->servername);
server->stat.cell_clients--;
silc_server_remove_from_channels(server, NULL, client, FALSE, NULL, FALSE);
silc_server_del_from_watcher_list(server, client);
- silc_idlist_del_client(server->local_list, client);
+ if (!silc_idlist_del_client(server->local_list, client))
+ silc_idlist_del_client(server->global_list, client);
client = detached_client;
/* If the ID is not based in our ID then change it */
{
FreeClientInternal i = (FreeClientInternal)context;
+ assert(!silc_hash_table_count(i->client->channels));
+
silc_idlist_del_data(i->client);
silc_idcache_purge_by_context(i->server->local_list->clients, i->client);
silc_free(i);
(void *)i, 300, 0,
SILC_TASK_TIMEOUT, SILC_TASK_PRI_LOW);
client->data.status &= ~SILC_IDLIST_STATUS_REGISTERED;
+ client->data.status &= ~SILC_IDLIST_STATUS_LOCAL;
client->mode = 0;
client->router = NULL;
client->connection = NULL;
break;
continue;
}
+ if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED) &&
+ !client->connection && !client->router && !SILC_IS_LOCAL(client)) {
+ if (!silc_idcache_list_next(list, &id_cache))
+ break;
+ continue;
+ }
idp = silc_id_payload_encode(client->id, SILC_ID_CLIENT);
silc_free(client_id);
+ if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED)) {
+ SILC_LOG_ERROR(("Attempting to add unregistered client to channel ",
+ "%s", channel->channel_name));
+ continue;
+ }
+
if (!silc_server_client_on_channel(client, channel, &chl)) {
/* Client was not on the channel, add it. */
chl = silc_calloc(1, sizeof(*chl));
char *name;
int i = 0;
- if (!channels ||!channels_user_modes)
+ if (!channels || !channels_user_modes ||
+ !(client->data.status & SILC_IDLIST_STATUS_REGISTERED))
goto out;
ch = silc_channel_payload_parse_list(channels->data, channels->len);
int i, count;
for (i = 0, count = 0; i < server->config->param.connections_max; i++) {
- if (server->sockets[i] && !strcmp(server->sockets[i]->ip, ip) &&
+ if (server->sockets[i] && !SILC_IS_LISTENER(server->sockets[i]) &&
+ !strcmp(server->sockets[i]->ip, ip) &&
server->sockets[i]->type == type)
count++;
}
return 0;
for (i = 0, count = 0; i < server->config->param.connections_max; i++) {
- if (server->sockets[i] &&
+ if (server->sockets[i] && !SILC_IS_LISTENER(server->sockets[i]) &&
((ip && !strcmp(server->sockets[i]->ip, ip)) ||
(hostname && !strcmp(server->sockets[i]->hostname, hostname))) &&
server->sockets[i]->port == port &&