memcpy (&a4, &t4->ipv4_addr, sizeof (a4));
sb = &a4;
break;
+ case 0:
+ {
+ GNUNET_snprintf (rbuf, sizeof (rbuf), "%s",
+ "<inbound>");
+ return rbuf;
+ }
default:
LOG (GNUNET_ERROR_TYPE_WARNING,
_("Unexpected address length: %u bytes\n"),
if (si_ctx.result != NULL)
{
session = si_ctx.result;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
"Found existing session for `%s' address `%s' session %p\n",
GNUNET_i2s (&address->peer),
tcp_address_to_string(NULL, address->address, address->address_length),
}
else if (0 == addrlen)
{
- asc (asc_cls, "<inbound connection>");
+ asc (asc_cls, "<inbound>");
asc (asc_cls, NULL);
return;
}
session->last_activity = GNUNET_TIME_absolute_get ();
session->expecting_welcome = GNUNET_NO;
-
/* Notify transport and ATS about new session */
- plugin->env->session_start (NULL, &wm->clientIdentity,
- PLUGIN_NAME, session->addr, session->addrlen, session, &ats, 1);
-
+ if (GNUNET_YES == session->inbound)
+ {
+ plugin->env->session_start (NULL, &wm->clientIdentity, PLUGIN_NAME,
+ (GNUNET_YES == session->inbound) ? NULL : session->addr,
+ (GNUNET_YES == session->inbound) ? 0 : session->addrlen,
+ session, &ats, 1);
+ }
process_pending_messages (session);
plugin->env->update_address_metrics (plugin->env->cls,
&session->target,
(GNUNET_YES == session->inbound) ? NULL : session->addr,
- (GNUNET_YES == session->inbound) ? 0 : session->addrlen,
- session,
- &distance,
- 1);
+ (GNUNET_YES == session->inbound) ? 0 : session->addrlen,
+ session, &distance, 1);
reschedule_session_timeout (session);