From 8acffd50c9bfbbcf0858fe291a3e9ddc61e3ee2c Mon Sep 17 00:00:00 2001 From: Daniel Gollub Date: Thu, 18 Jun 2015 10:01:15 +0200 Subject: Make socket creation errno verbose --- libtac/lib/connect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libtac/lib/connect.c b/libtac/lib/connect.c index a186220..ab42377 100644 --- a/libtac/lib/connect.c +++ b/libtac/lib/connect.c @@ -86,7 +86,8 @@ int tac_connect_single(struct addrinfo *server, const char *key, struct addrinfo ip = tac_ntop(server->ai_addr); if((fd=socket(server->ai_family, server->ai_socktype, server->ai_protocol)) < 0) { - TACSYSLOG((LOG_ERR,"%s: socket creation error", __FUNCTION__)) + TACSYSLOG((LOG_ERR,"%s: socket creation error: %s", __FUNCTION__, + strerror(errno))) return LIBTAC_STATUS_CONN_ERR; } -- cgit v1.2.3