From a08b57423e9b0a70599faed2509240e208a06cfa Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 13 Feb 2012 15:27:12 +0000 Subject: [PATCH] - minor fix --- src/transport/plugin_transport_tcp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index eedb9f910..2ce3cc8c7 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -1320,6 +1320,13 @@ tcp_plugin_get_session (void *cls, addrlen = address->address_length; +#if DEBUG_TCP + GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", + "Trying to get session for `%s' address length %i\n", + tcp_address_to_string(NULL, address->address, address->address_length), + addrlen); +#endif + if (addrlen == sizeof (struct IPv6TcpAddress)) { GNUNET_assert (NULL != address->address); /* make static analysis happy */ @@ -1368,10 +1375,13 @@ tcp_plugin_get_session (void *cls, struct SessionItCtx si_ctx; si_ctx.addr = &sbs; si_ctx.addrlen = sbs; + si_ctx.result = NULL; GNUNET_CONTAINER_multihashmap_get_multiple(plugin->sessionmap, &address->peer.hashPubKey, &session_it, &si_ctx); if (si_ctx.result != NULL) + { session = si_ctx.result; - return session; + return session; + } } if ((is_natd == GNUNET_YES) && (addrlen == sizeof (struct IPv6TcpAddress))) -- 2.25.1