From 857c458fe1903ded0b6b7b444942f4f996223460 Mon Sep 17 00:00:00 2001 From: Anush Shetty Date: Wed, 12 May 2010 03:59:47 +0000 Subject: Adding GF_LOG_OCCASIONALLY to prevent repeated log messages when server goes down Signed-off-by: Anush Shetty Signed-off-by: Anand V. Avati BUG: 906 (when server is down, client log gets filled up with error msgs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=906 --- transport/ib-verbs/src/ib-verbs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'transport') diff --git a/transport/ib-verbs/src/ib-verbs.c b/transport/ib-verbs/src/ib-verbs.c index b43f942ec9e..98d084d6621 100644 --- a/transport/ib-verbs/src/ib-verbs.c +++ b/transport/ib-verbs/src/ib-verbs.c @@ -33,6 +33,8 @@ #include "ib-verbs.h" #include +static int gf_ib_connfail_log; + int32_t gf_resolve_ip6 (const char *hostname, uint16_t port, @@ -2015,9 +2017,11 @@ tcp_connect_finish (transport_t *this) } if (ret == -1 && errno != EINPROGRESS) { - gf_log (this->xl->name, GF_LOG_ERROR, - "tcp connect to %s failed (%s)", - this->peerinfo.identifier, strerror (errno)); + GF_LOG_OCCASIONALLY (gf_ib_connfail_log, + this->xl->name, GF_LOG_ERROR, + "tcp connect to %s failed (%s)", + this->peerinfo.identifier, + strerror (errno)); error = 1; } } -- cgit