Note: doesn't build anymore since remote is sockaddr_storage now. --- ./dataxfer.c.orig 2014-10-06 10:58:24.919982485 +0200 +++ ./dataxfer.c 2014-10-06 11:01:35.091981560 +0200 @@ -1480,6 +1480,7 @@ port_info_t *port = (port_info_t *) data; socklen_t len; char *err = NULL; + char buffer[256]; int optval; if (port->tcp_to_dev_state != PORT_UNCONNECTED) { @@ -1489,7 +1490,8 @@ /* Wait the port to be unconnected and clean, go back to main loop*/ return; } - err = "Port already in use\n\r"; + snprintf(buffer, 256, "Port already in use by %s.\r\n", inet_ntoa(port->remote.sin_addr)); + err = buffer; } else if (is_device_already_inuse(port)) { err = "Port's device already in use\n\r"; }