Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2008 Pekka Riikonen
+ Copyright (C) 1997 - 2009 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
SilcPacketType type = packet->type;
SilcIDListData idata = silc_packet_get_context(sock);
+#ifdef SILC_DEBUG
+ const char *ip;
+ SilcUInt16 port;
+
+ silc_socket_stream_get_info(silc_packet_stream_get_stream(sock),
+ NULL, NULL, &ip, &port);
+#endif /* SILC_DEBUG */
- SILC_LOG_DEBUG(("Received %s packet [flags %d]",
- silc_get_packet_name(type), packet->flags));
+ SILC_LOG_DEBUG(("Received %s packet [flags %d] from %s:%d",
+ silc_get_packet_name(type), packet->flags, ip, port));
/* Parse the packet type */
switch (type) {
/* Add connection to server->conns so that we know we have connection
to this peer. */
sconn = silc_calloc(1, sizeof(*sconn));
+ if (!sconn)
+ goto out;
sconn->server = server;
sconn->sock = sock;
sconn->remote_host = strdup(hostname);
silc_packet_free(packet);
return;
}
+ if (idata->conn_type == SILC_CONN_UNKNOWN) {
+ silc_packet_free(packet);
+ return;
+ }
SILC_LOG_DEBUG(("Executing rekey protocol with %s:%d [%s], sock %p",
idata->sconn->remote_host, idata->sconn->remote_port,
}
client->data.status |= SILC_IDLIST_STATUS_REGISTERED;
+
+ SILC_LOG_DEBUG(("stat.clients %d->%d", server->stat.clients,
+ server->stat.clients + 1));
+ server->stat.clients++;
}
if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED)) {