+
+ /* look for existing session */
+ if (GNUNET_CONTAINER_multihashmap_contains(plugin->sessionmap, &address->peer.hashPubKey))
+ {
+ struct SessionItCtx si_ctx;
+
+ si_ctx.addr = (void *) address->address;
+ si_ctx.addrlen = address->address_length;
+
+ si_ctx.result = NULL;
+
+ GNUNET_CONTAINER_multihashmap_get_multiple(plugin->sessionmap, &address->peer.hashPubKey, &session_lookup_it, &si_ctx);
+ if (si_ctx.result != NULL)
+ {
+ session = si_ctx.result;
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp",
+ "Found exisiting session for `%s' address `%s' session %p\n",
+ GNUNET_i2s (&address->peer),
+ tcp_address_to_string(NULL, address->address, address->address_length),
+ session);
+ return session;
+ }
+ }