X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fclient_connect.c;h=9d74e0b317124323dd399e99428cf37db422248a;hb=08e0dddd6750b245da53e2bc3528d0b5a6d57e8b;hp=aeaa374fd231991dd57b6610d0856390d70ff264;hpb=f7bc45b99c6d3d8c919b82574b1b06c096062c8d;p=silc.git diff --git a/lib/silcclient/client_connect.c b/lib/silcclient/client_connect.c index aeaa374f..9d74e0b3 100644 --- a/lib/silcclient/client_connect.c +++ b/lib/silcclient/client_connect.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2006 - 2007 Pekka Riikonen + Copyright (C) 2006 - 2008 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 @@ -454,6 +454,11 @@ SILC_FSM_STATE(silc_client_st_connect_set_stream) silc_packet_set_context(conn->stream, conn); + /* Save socket stream and socket into connection context */ + conn->socket_stream = silc_packet_stream_get_stream(conn->stream); + silc_socket_stream_get_info(conn->socket_stream, &conn->sock, NULL, + NULL, NULL); + /** Start key exchange */ silc_fsm_next(fsm, silc_client_st_connect_key_exchange); return SILC_FSM_CONTINUE; @@ -551,6 +556,9 @@ SILC_FSM_STATE(silc_client_st_connect_setup_udp) /* Set the new stream to packet stream */ old = silc_packet_stream_get_stream(conn->stream); silc_packet_stream_set_stream(conn->stream, stream); + conn->socket_stream = stream; + silc_socket_stream_get_info(conn->socket_stream, &conn->sock, NULL, + NULL, NULL); silc_packet_stream_set_iv_included(conn->stream); silc_packet_set_sid(conn->stream, 0);