From 470d5c4af7f85809997a77af187c8f430b0354c8 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Sat, 21 Mar 2015 19:59:45 +0530 Subject: libgfchangelog: cleanups on disconnection [WIP patch as of now, just needs a little tweak] A pending TODO in the code caused regressions to fail as bitrot daemons are spawned during volume start (equivalent to enabling bitrot by default). The problematic part that casued such failures is during brick disconnections with unsafe handling of event data structured in the code. With this patch, data structures are properly cleaned up with care taken to cleanup all accessors first. This also fixes potential memory leaks which was bluntly ignored before. Change-Id: I70ed82cb1a0fb56c85ef390007e321a97a35c5ce BUG: 1170075 Signed-off-by: Venky Shankar original-author: Venky Shankar Reviewed-on: http://review.gluster.org/9959 Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- xlators/features/changelog/lib/src/gf-changelog-rpc.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'xlators/features/changelog/lib/src/gf-changelog-rpc.c') diff --git a/xlators/features/changelog/lib/src/gf-changelog-rpc.c b/xlators/features/changelog/lib/src/gf-changelog-rpc.c index c2a4c044d23..270632bc71b 100644 --- a/xlators/features/changelog/lib/src/gf-changelog-rpc.c +++ b/xlators/features/changelog/lib/src/gf-changelog-rpc.c @@ -19,17 +19,11 @@ int gf_changelog_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, void *data) { - xlator_t *this = NULL; - - this = mydata; - switch (event) { case RPC_CLNT_CONNECT: rpc_clnt_set_connected (&rpc->conn); break; case RPC_CLNT_DISCONNECT: - rpc_clnt_unset_connected (&rpc->conn); - break; case RPC_CLNT_MSG: case RPC_CLNT_DESTROY: break; -- cgit