clientlib: Close connection after failed rekey
authorPekka Riikonen <priikone@silcnet.org>
Fri, 25 Sep 2009 09:06:45 +0000 (12:06 +0300)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 25 Sep 2009 09:06:45 +0000 (12:06 +0300)
lib/silcclient/client_connect.c
lib/silccore/silcpacket.h

index de87143f047ff3f9dc6be0eb51df4c66b2743fd9..145f398f1a3916d9b9dd72a9a9ec2f579c9aa931 100644 (file)
@@ -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;
   }
 
index 0caf10d8c21bc8b54c245e3311265b8b785e6e9a..72046d768ef8f26237c70f29d054d1bbf57ec646 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  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