From: Vincent Bernat Date: Fri, 21 Nov 2008 09:56:22 +0000 (+0100) Subject: When unable to connect to SNMP socket, give a sensible error message X-Git-Tag: 0.3~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ac76ebafe4449f4ad29a89921d3e98237cfa8ae;p=thirdparty%2Flldpd.git When unable to connect to SNMP socket, give a sensible error message --- diff --git a/src/priv.c b/src/priv.c index a2967bbb..513bc005 100644 --- a/src/priv.c +++ b/src/priv.c @@ -413,7 +413,8 @@ asroot_snmp_socket() } if ((rc = connect(sock, (struct sockaddr *) addr, sizeof(struct sockaddr_un))) != 0) { - LLOG_INFO("[priv]: cannot connect to %s", addr->sun_path); + LLOG_INFO("[priv]: cannot connect to %s: %s", + addr->sun_path, strerror(errno)); close(sock); rc = -1; must_write(remote, &rc, sizeof(int));