Print out *which* socket could not be opened.
authorAlan T. DeKok <aland@freeradius.org>
Wed, 10 Nov 2010 16:19:12 +0000 (17:19 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 10 Nov 2010 16:22:01 +0000 (17:22 +0100)
src/main/listen.c

index 57c9607..765a6b2 100644 (file)
@@ -1945,7 +1945,11 @@ static int listen_bind(rad_listen_t *this)
         */
        this->fd = socket(sock->my_ipaddr.af, sock_type, 0);
        if (this->fd < 0) {
-               radlog(L_ERR, "Failed opening socket: %s", strerror(errno));
+               char buffer[256];
+
+               this->print(this, buffer, sizeof(buffer));
+
+               radlog(L_ERR, "Failed opening %s: %s", buffer, strerror(errno));
                return -1;
        }