projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added socket stream and socket into SilcClientConnection context.
[silc.git]
/
lib
/
silcclient
/
client_connect.c
diff --git
a/lib/silcclient/client_connect.c
b/lib/silcclient/client_connect.c
index aeaa374fd231991dd57b6610d0856390d70ff264..9d74e0b317124323dd399e99428cf37db422248a 100644
(file)
--- a/
lib/silcclient/client_connect.c
+++ b/
lib/silcclient/client_connect.c
@@
-4,7
+4,7
@@
Author: Pekka Riikonen <priikone@silcnet.org>
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2006 - 200
7
Pekka Riikonen
+ Copyright (C) 2006 - 200
8
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
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);
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;
/** 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);
/* 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);
silc_packet_stream_set_iv_included(conn->stream);
silc_packet_set_sid(conn->stream, 0);