summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-12-09 02:06:52 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-12-10 02:51:12 -0800
commit9f480be0333863a2cb30088504d233fd6eb46ebf (patch)
tree19804125c16b373c123370054daf95b64158d2a5 /xlators/protocol
parent353fb2e97bfc3a44cc5301fa8dfb015406565048 (diff)
protocol: avoid repetitive disconnect logs
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index e83badca98a..56ac45a4d27 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -1559,6 +1559,7 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
switch (event) {
case RPC_CLNT_CONNECT:
{
+ conf->connected = 1;
// connect happened, send 'get_supported_versions' mop
ret = dict_get_str (this->options, "disable-handshake",
&handshake);
@@ -1584,12 +1585,17 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
client_mark_fd_bad (this);
if (!conf->skip_notify) {
- gf_log (this->name, GF_LOG_NORMAL, "disconnected");
+ if (conf->connected)
+ gf_log (this->name, GF_LOG_NORMAL,
+ "disconnected");
default_notify (this, GF_EVENT_CHILD_DOWN, NULL);
} else {
- gf_log (this->name, GF_LOG_TRACE, "disconnected (skipped notify)");
+ if (conf->connected)
+ gf_log (this->name, GF_LOG_DEBUG,
+ "disconnected (skipped notify)");
}
+ conf->connected = 0;
conf->skip_notify = 0;
break;