+Sat Jun 9 20:17:30 EEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ * 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 <priikone@poseidon.pspt.fi>
* silc_server_whois_send_reply crashed the server if the nickname
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");
}