From: David Goulet Date: Fri, 5 Jul 2013 16:01:10 +0000 (-0400) Subject: Fix: print errno message on connect() error X-Git-Tag: v2.2.1~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=69e52df19b3290d6eb71087657a08a2d520e27e5;p=lttng-tools.git Fix: print errno message on connect() error Signed-off-by: David Goulet --- diff --git a/src/common/sessiond-comm/inet.c b/src/common/sessiond-comm/inet.c index f55482e42..b2bd65d90 100644 --- a/src/common/sessiond-comm/inet.c +++ b/src/common/sessiond-comm/inet.c @@ -102,10 +102,7 @@ int lttcomm_connect_inet_sock(struct lttcomm_sock *sock) ret = connect(sock->fd, (struct sockaddr *) &sock->sockaddr.addr.sin, sizeof(sock->sockaddr.addr.sin)); if (ret < 0) { - /* - * Don't print message on connect error, because connect is used in - * normal execution to detect if sessiond is alive. - */ + PERROR("connect"); goto error_connect; } diff --git a/src/common/sessiond-comm/inet6.c b/src/common/sessiond-comm/inet6.c index e9558d948..8d8837404 100644 --- a/src/common/sessiond-comm/inet6.c +++ b/src/common/sessiond-comm/inet6.c @@ -102,10 +102,7 @@ int lttcomm_connect_inet6_sock(struct lttcomm_sock *sock) ret = connect(sock->fd, (struct sockaddr *) &sock->sockaddr.addr.sin6, sizeof(sock->sockaddr.addr.sin6)); if (ret < 0) { - /* - * Don't print message on connect error, because connect is used in - * normal execution to detect if sessiond is alive. - */ + PERROR("connect inet6"); goto error_connect; }