GNUNET_i2s (&state->peer),
GNUNET_h2s (&start->service_descriptor),
(unsigned int) ntohs (start->tcp_header.destination_port));
- if (NULL == (state->specifics.tcp_udp.serv = find_service (tcp_services, &start->service_descriptor,
- ntohs (start->tcp_header.destination_port))))
+ if (NULL == (state->specifics.tcp_udp.serv =
+ find_service (tcp_services,
+ &start->service_descriptor,
+ ntohs (start->tcp_header.destination_port))))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("No service found for %s on port %d!\n"),
+ _("No service %s found for %s on port %d!\n"),
+ GNUNET_h2s (&start->service_descriptor),
"TCP",
ntohs (start->tcp_header.destination_port));
GNUNET_STATISTICS_update (stats,
GNUNET_i2s (&state->peer),
GNUNET_h2s (&msg->service_descriptor),
(unsigned int) ntohs (msg->destination_port));
- if (NULL == (state->specifics.tcp_udp.serv = find_service (udp_services, &msg->service_descriptor,
- ntohs (msg->destination_port))))
+ if (NULL == (state->specifics.tcp_udp.serv =
+ find_service (udp_services,
+ &msg->service_descriptor,
+ ntohs (msg->destination_port))))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("No service found for %s on port %d!\n"),
+ _("No service %s found for %s on port %d!\n"),
+ GNUNET_h2s (&msg->service_descriptor),
"UDP",
ntohs (msg->destination_port));
GNUNET_STATISTICS_update (stats,
char *hostname;
char *hostport;
struct LocalService *serv;
+ char *n;
+ size_t slen;
+
+ slen = strlen (name);
+ GNUNET_assert (slen >= 8);
+ n = GNUNET_strndup (name, slen - 8 /* remove .gnunet. */);
for (redirect = strtok (cpy, " "); redirect != NULL;
redirect = strtok (NULL, " "))
if (NULL == (hostport = strstr (hostname, ":")))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Option `%s' for domain `%s' is not formatted correctly!\n"),
- redirect,
- name);
+ _("Option `%s' for domain `%s' is not formatted correctly!\n"),
+ redirect,
+ name);
continue;
}
hostport[0] = '\0';
if (!((local_port > 0) && (local_port < 65536)))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("`%s' is not a valid port number (for domain `%s')!"),
+ _("`%s' is not a valid port number (for domain `%s')!"),
redirect,
- name);
+ name);
continue;
}
if (!((remote_port > 0) && (remote_port < 65536)))
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("No addresses found for hostname `%s' of service `%s'!\n"),
hostname,
- name);
+ n);
GNUNET_free (serv);
continue;
}
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Service `%s' configured for IPv4, but IPv4 is disabled!\n"),
- name);
+ n);
freeaddrinfo (res);
GNUNET_free (serv);
continue;
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Service `%s' configured for IPv4, but IPv4 is disabled!\n"),
- name);
+ n);
freeaddrinfo (res);
GNUNET_free (serv);
continue;
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("No IP addresses found for hostname `%s' of service `%s'!\n"),
hostname,
- name);
+ n);
GNUNET_free (serv);
continue;
}
freeaddrinfo (res);
}
store_service ((IPPROTO_UDP == proto) ? udp_services : tcp_services,
- name,
+ n,
local_port,
serv);
}
+ GNUNET_free (n);
}