X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fstatsd.c;h=6fbfd181fd6f418cc7dec715d16fc7b2f6d64e31;hb=733fc645b6389d1f42aef8f1c1631f1db7d58196;hp=444e8ea119c2b6ff2087f0eeabcb46eba66861f8;hpb=d77088d0b617add07aafbc0bcca1e0064a5b16d6;p=collectd.git diff --git a/src/statsd.c b/src/statsd.c index 444e8ea1..6fbfd181 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -489,8 +489,8 @@ static int statsd_network_init(struct pollfd **ret_fds, /* {{{ */ int fd; struct pollfd *tmp; - char dbg_node[NI_MAXHOST]; - char dbg_service[NI_MAXSERV]; + char str_node[NI_MAXHOST]; + char str_service[NI_MAXSERV]; fd = socket(ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol); if (fd < 0) { @@ -498,15 +498,16 @@ static int statsd_network_init(struct pollfd **ret_fds, /* {{{ */ continue; } - getnameinfo(ai_ptr->ai_addr, ai_ptr->ai_addrlen, dbg_node, sizeof(dbg_node), - dbg_service, sizeof(dbg_service), + getnameinfo(ai_ptr->ai_addr, ai_ptr->ai_addrlen, str_node, sizeof(str_node), + str_service, sizeof(str_service), NI_DGRAM | NI_NUMERICHOST | NI_NUMERICSERV); - DEBUG("statsd plugin: Trying to bind to [%s]:%s ...", dbg_node, - dbg_service); + DEBUG("statsd plugin: Trying to bind to [%s]:%s ...", str_node, + str_service); status = bind(fd, ai_ptr->ai_addr, ai_ptr->ai_addrlen); if (status != 0) { - ERROR("statsd plugin: bind(2) failed: %s", STRERRNO); + ERROR("statsd plugin: bind(2) to [%s]:%s failed: %s", str_node, + str_service, STRERRNO); close(fd); continue; }