summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-13 08:32:37 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-13 07:23:39 -0700
commit174f963c846331c6dafda169451790b6039ef3fb (patch)
tree18bd105b5a354d9d106a686a10a055ce07f7b2b4 /xlators
parent39e268ee69618488616df1c253b851c07442c863 (diff)
rpc: in rpc_clnt_destroy(), cleanup the transport too
* if we don't cleanup the transport, it will trigger false events on the free'd transport which causes crash Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1423 (Crash in gf_timer_call_cancel) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1423
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
index 2be2de4d2..9656dba1e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
@@ -278,7 +278,7 @@ glusterd_ac_handle_friend_remove_req (glusterd_friend_sm_event_t *event,
ret = glusterd_xfer_friend_remove_resp (ev_ctx->req, ev_ctx->hostname,
ev_ctx->port);
- //rpc_clnt_destroy (peerinfo->rpc);
+ rpc_clnt_destroy (peerinfo->rpc);
peerinfo->rpc = NULL;
ret = glusterd_friend_sm_new_event (GD_FRIEND_EVENT_REMOVE_FRIEND,
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index ab86041d8..4e65a7f0f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -727,6 +727,7 @@ glusterd_friend_cleanup (glusterd_peerinfo_t *peerinfo)
{
GF_ASSERT (peerinfo);
if (peerinfo->rpc) {
+ rpc_clnt_destroy (peerinfo->rpc);
peerinfo->rpc = NULL;
}
glusterd_peer_destroy (peerinfo);