From: Pekka Riikonen Date: Sat, 9 Jun 2001 17:20:45 +0000 (+0000) Subject: updated. X-Git-Tag: robodoc-323~203 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=3df76503de1535919ed6cddc1b181fab31b01b0a;p=silc.git updated. --- diff --git a/CHANGES b/CHANGES index 8b3e0adf..43bb3857 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Sat Jun 9 20:17:30 EEST 2001 Pekka Riikonen + + * Check in the silc_server_timeout_remote if protocol is active + and make sure that the protocol's final callback is called so + that all memory if freed. Affected file silcd/server.c. + Sat Jun 9 12:51:27 EEST 2001 Pekka Riikonen * silc_server_whois_send_reply crashed the server if the nickname diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 7593e703..83cb7fef 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -2712,14 +2712,23 @@ SILC_TASK_CALLBACK(silc_server_timeout_remote) SilcServer server = (SilcServer)context; SilcSocketConnection sock = server->sockets[fd]; + SILC_LOG_DEBUG(("Start")); + if (!sock) return; + /* If we have protocol active we must assure that we call the protocol's + final callback so that all the memory is freed. */ + if (sock->protocol) { + sock->protocol->state = SILC_PROTOCOL_STATE_ERROR; + silc_protocol_execute_final(sock->protocol, server->timeout_queue); + return; + } + if (sock->user_data) silc_server_free_sock_user_data(server, sock); - silc_server_disconnect_remote(server, sock, - "Server closed connection: " + silc_server_disconnect_remote(server, sock, "Server closed connection: " "Connection timeout"); }