* to override the address again.
*
* @param cls closure
+ * @param plugin the plugin
* @param addr binary address
* @param addrlen length of the address
* @return string representing the same address
const char * addr_str;
char *res;
+ GNUNET_assert (NULL != plugin);
if (NULL == addr)
return NULL;
- if (0 >= addrlen)
- return NULL;
+ if (0 == addrlen)
+ return TRANSPORT_SESSION_INBOUND_STRING;
if (addrlen != http_common_address_get_size (address))
return NULL;
addr_str = (char *) &address[1];
if (addr_str[ntohl(address->urlen) -1] != '\0')
return NULL;
-
- GNUNET_asprintf (&res, "%s.%u.%s", plugin, address->options, &address[1]);
+ GNUNET_asprintf (&res, "%s.%u.%s", plugin, ntohl(address->options), &address[1]);
if (strlen(res) + 1 < 500)
{
memcpy (rbuf, res, strlen(res) + 1);