entry->data.conn_type = SILC_CONN_CLIENT;
/* Statistics */
+ SILC_LOG_DEBUG(("stat.clients %d->%d", server->stat.clients,
+ server->stat.clients + 1));
server->stat.my_clients++;
server->stat.clients++;
server->stat.cell_clients++;
sock, idata->sconn->rekey_timeout, 0);
}
+/* Helper to stop future rekeys on a link. */
+void silc_server_stop_rekey(SilcServer server, SilcClientEntry client)
+{
+ if (!client->connection)
+ return;
+
+ SILC_LOG_DEBUG(("Stopping rekey for client %p", client));
+
+ silc_schedule_task_del_by_all(server->schedule, 0, silc_server_do_rekey,
+ client->connection);
+}
+
/* Rekey callback. Start rekey as initiator */
SILC_TASK_CALLBACK(silc_server_do_rekey)
}
/* Update statistics */
- server->stat.my_clients--;
+
+ /* Local detached clients aren't counted. */
+ if (!client->local_detached)
+ server->stat.my_clients--;
+ SILC_LOG_DEBUG(("stat.clients %d->%d", server->stat.clients,
+ server->stat.clients - 1));
SILC_VERIFY(server->stat.clients > 0);
server->stat.clients--;
if (server->stat.cell_clients)
if (idata->sconn && idata->sconn->op) {
SILC_LOG_DEBUG(("Abort active protocol"));
silc_async_abort(idata->sconn->op, NULL, NULL);
+ idata->sconn->op = NULL;
}
if (idata->conn_type == SILC_CONN_UNKNOWN &&
((SilcUnknownEntry)idata)->op) {
SILC_LOG_DEBUG(("Abort active protocol"));
silc_async_abort(((SilcUnknownEntry)idata)->op, NULL, NULL);
+ idata->sconn->op = NULL;
}
}
}
if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED)) {
- SILC_LOG_ERROR(("Attempting to add unregistered client to channel ",
+ SILC_LOG_ERROR(("Attempting to add unregistered client to channel "
"%s", channel->channel_name));
continue;
}