if (se->data.client.bind_addr == NULL)
return 0;
- DEBUG("fd %i: bind socket to address", se->data.client.fd);
+ DEBUG("network_plugin: fd %i: bind socket to address", se->data.client.fd);
char pbuffer[64];
if (ai->ai_family == AF_INET) {
DEBUG("network_plugin: binding client socket to ipv4 address: %s", pbuffer);
if (bind(se->data.client.fd, (struct sockaddr *)addr, sizeof(*addr)) ==
-1) {
- ERROR("network_plugin: failed to bind client socket (ipv4): %s",
- STRERRNO);
+ ERROR("network plugin: failed to bind client socket (ipv4) to %s: %s",
+ pbuffer, STRERRNO);
return -1;
}
} else if (ai->ai_family == AF_INET6) {
DEBUG("network_plugin: binding client socket to ipv6 address: %s", pbuffer);
if (bind(se->data.client.fd, (struct sockaddr *)addr, sizeof(*addr)) ==
-1) {
- ERROR("network_plugin: failed to bind client socket (ipv6): %s",
- STRERRNO);
+ ERROR("network plugin: failed to bind client socket (ipv6) to %s: %s",
+ pbuffer, STRERRNO);
return -1;
}
}