projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
silcd: increment stat.clients statistics whenever adding new client
[silc.git]
/
apps
/
silcd
/
server.c
diff --git
a/apps/silcd/server.c
b/apps/silcd/server.c
index 9924e8bea740311b2eb083fe2f21eb6ba099b456..9fb4aaf3acb9e1ff9142fc8341c7b38011921d78 100644
(file)
--- a/
apps/silcd/server.c
+++ b/
apps/silcd/server.c
@@
-4,7
+4,7
@@
Author: Pekka Riikonen <priikone@silcnet.org>
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 200
8
Pekka Riikonen
+ Copyright (C) 1997 - 200
9
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
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
@@
-318,9
+318,16
@@
static void silc_server_packet_parse_type(SilcServer server,
{
SilcPacketType type = packet->type;
SilcIDListData idata = silc_packet_get_context(sock);
{
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) {
/* Parse the packet type */
switch (type) {
@@
-5045,6
+5052,10
@@
void silc_server_save_users_on_channel(SilcServer server,
}
client->data.status |= SILC_IDLIST_STATUS_REGISTERED;
}
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)) {
}
if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED)) {