diff options
Diffstat (limited to 'network.c')
-rw-r--r-- | network.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -37,7 +37,7 @@ int create_socket(struct sockaddr *sa, size_t sock_len) { /* Did we fail to create the listen socket? */ if (fd < 0) { - log_reason(LOG_ERR, "Failed to create listen socket.", strerror(errno)); + log_reason(LOG_ERR, "Failed to create listen socket for addresss \"%s\".", addr_str, strerror(errno)); return -1; } @@ -49,20 +49,20 @@ int create_socket(struct sockaddr *sa, size_t sock_len) { /* Did we fail to enable SO_REUSEADDR? */ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) { - log_reason(LOG_ERR, "Failed to enable SO_REUSEADDR.", strerror(errno)); + log_reason(LOG_ERR, "Failed to enable SO_REUSEADDR for socket %i.", fd, strerror(errno)); ret = -1; } /* Did we fail to bind the listen socket? */ if (ret >= 0 && bind(fd, sa, sock_len) < 0) { - log_reason(LOG_ERR, "Failed to bind listen socket.", strerror(errno)); + log_reason(LOG_ERR, "Failed to bind listen socket %i with address \"%s\".", fd, addr_str, strerror(errno)); ret = -1; } /* Did we fail to listen to the socket? */ if (ret >= 0 && listen(fd, 20) < 0) { - log_reason(LOG_ERR, "Failed to listen to socket.", strerror(errno)); + log_reason(LOG_ERR, "Failed to listen to socket %i.", fd, strerror(errno)); ret = -1; } |