diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-02-13 15:27:12 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-02-13 15:27:12 +0000 |
commit | a08b57423e9b0a70599faed2509240e208a06cfa (patch) | |
tree | 81729b8c1d4e74f1219c81a773de9b77f496ba4f /src/transport/plugin_transport_tcp.c | |
parent | 3e5ab9df02fab26be7a2c64e62085b1ab4c7ec06 (diff) | |
download | gnunet-a08b57423e9b0a70599faed2509240e208a06cfa.tar.gz gnunet-a08b57423e9b0a70599faed2509240e208a06cfa.zip |
- minor fix
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 12 |
1 files changed, 11 insertions, 1 deletions
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, | |||
1320 | 1320 | ||
1321 | addrlen = address->address_length; | 1321 | addrlen = address->address_length; |
1322 | 1322 | ||
1323 | #if DEBUG_TCP | ||
1324 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | ||
1325 | "Trying to get session for `%s' address length %i\n", | ||
1326 | tcp_address_to_string(NULL, address->address, address->address_length), | ||
1327 | addrlen); | ||
1328 | #endif | ||
1329 | |||
1323 | if (addrlen == sizeof (struct IPv6TcpAddress)) | 1330 | if (addrlen == sizeof (struct IPv6TcpAddress)) |
1324 | { | 1331 | { |
1325 | GNUNET_assert (NULL != address->address); /* make static analysis happy */ | 1332 | GNUNET_assert (NULL != address->address); /* make static analysis happy */ |
@@ -1368,10 +1375,13 @@ tcp_plugin_get_session (void *cls, | |||
1368 | struct SessionItCtx si_ctx; | 1375 | struct SessionItCtx si_ctx; |
1369 | si_ctx.addr = &sbs; | 1376 | si_ctx.addr = &sbs; |
1370 | si_ctx.addrlen = sbs; | 1377 | si_ctx.addrlen = sbs; |
1378 | si_ctx.result = NULL; | ||
1371 | GNUNET_CONTAINER_multihashmap_get_multiple(plugin->sessionmap, &address->peer.hashPubKey, &session_it, &si_ctx); | 1379 | GNUNET_CONTAINER_multihashmap_get_multiple(plugin->sessionmap, &address->peer.hashPubKey, &session_it, &si_ctx); |
1372 | if (si_ctx.result != NULL) | 1380 | if (si_ctx.result != NULL) |
1381 | { | ||
1373 | session = si_ctx.result; | 1382 | session = si_ctx.result; |
1374 | return session; | 1383 | return session; |
1384 | } | ||
1375 | } | 1385 | } |
1376 | 1386 | ||
1377 | if ((is_natd == GNUNET_YES) && (addrlen == sizeof (struct IPv6TcpAddress))) | 1387 | if ((is_natd == GNUNET_YES) && (addrlen == sizeof (struct IPv6TcpAddress))) |