diff options
author | Amar Tumballi <amar@gluster.com> | 2010-10-08 10:17:55 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-08 09:16:24 -0700 |
commit | e0cdcbf68ab1dc1cc1af874cd84579d89a3e3747 (patch) | |
tree | 818d476c245ed05326e077b4c9a82f4a7f23cdaa /xlators | |
parent | cd5c9df4b67073089a5502d5e4c2e2e7d2141e4a (diff) |
rpc-clnt: do rpc_transport_destroy() in rpc_clnt_destroy()
handles the case of peer detach properly
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@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')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 3 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 70734074f..dcc408eb0 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -3182,6 +3182,9 @@ glusterd_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, glusterd_peerctx_t *peerctx = NULL; peerctx = mydata; + if (!peerctx) + return 0; + peerinfo = peerctx->peerinfo; this = THIS; conf = this->private; diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index cceecc11c..6475ca277 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -754,9 +754,9 @@ glusterd_friend_cleanup (glusterd_peerinfo_t *peerinfo) if (peerinfo->rpc) { peerctx = peerinfo->rpc->mydata; peerinfo->rpc->mydata = NULL; - GF_FREE (peerctx); peerinfo->rpc = rpc_clnt_unref (peerinfo->rpc); peerinfo->rpc = NULL; + GF_FREE (peerctx); } glusterd_peer_destroy (peerinfo); |