From 6df94e06cc4dcb60756ac49bd751c4cf95999703 Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Sun, 5 Mar 2017 21:39:20 +0530 Subject: rpc: avoid logging success on failure Avoid logging Success in the event of failure especially when errno has no meaningful value w.r.t. the failure. In this case the errno is set to zero when there's indeed a failure at the RPC level. mainline: > BUG: 1426032 > Signed-off-by: Milind Changire > Reviewed-on: https://review.gluster.org/16730 > Smoke: Gluster Build System > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Reviewed-by: N Balachandran > Reviewed-by: Jeff Darcy (cherry picked from commit 89c6bedc1c2e978f67ca29f212a357984cd8a2dd) Change-Id: If2cc81aa1e590023ed22892dacbef7cac213e591 BUG: 1451995 Signed-off-by: Milind Changire Reviewed-on: https://review.gluster.org/17326 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra Talur --- rpc/rpc-transport/socket/src/socket.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rpc/rpc-transport/socket') diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index d4a40b574ca..fd422dfd967 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3165,6 +3165,7 @@ socket_connect (rpc_transport_t *this, int port) } } + this->connect_failed = _gf_false; if (ign_enoent) { ret = connect_loop (priv->sock, SA (&this->peerinfo.sockaddr), @@ -3188,6 +3189,7 @@ socket_connect (rpc_transport_t *this, int port) /* TBD: What about ENOENT, we will do getsockopt there as well, so how is that exempt from such a problem? */ priv->connect_failed = 1; + this->connect_failed = _gf_true; goto handler; } -- cgit