From: Pekka Riikonen Date: Fri, 25 Sep 2009 09:06:45 +0000 (+0300) Subject: clientlib: Close connection after failed rekey X-Git-Tag: silc.client.1.1.9~36 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=80bb7b35c2a1f44702631f1a5cf5685d5ce4b2c7 clientlib: Close connection after failed rekey --- diff --git a/lib/silcclient/client_connect.c b/lib/silcclient/client_connect.c index de87143f..145f398f 100644 --- a/lib/silcclient/client_connect.c +++ b/lib/silcclient/client_connect.c @@ -262,6 +262,9 @@ static void silc_client_rekey_completion(SilcSKE ske, silc_ske_free(conn->internal->ske); conn->internal->ske = NULL; silc_fsm_finish(fsm); + + /* Close connection */ + silc_client_close_connection(client, conn); return; } diff --git a/lib/silccore/silcpacket.h b/lib/silccore/silcpacket.h index 0caf10d8..72046d76 100644 --- a/lib/silccore/silcpacket.h +++ b/lib/silccore/silcpacket.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 1997 - 2007 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 @@ -439,6 +439,10 @@ void silc_packet_engine_free_streams_list(SilcDList streams); * stream. After this function returns, packets can immediately be * sent to and received from the stream. * + * The `stream' will be owned by the packet stream and will be closed + * and destroyed when the packet stream is destroyed. If the packet + * stream creation fails the `stream' is left intact. + * * NOTES * * SilcPacketStream cannot be used with silc_stream_* routines (such as