diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-02-23 14:46:04 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-01 09:12:10 -0800 |
commit | 86f631f4283cba7185e5b1d5a3be4b9a614ed985 (patch) | |
tree | 04ef089c7de54aec4348e308fda4015e82092123 /xlators/protocol/server/src/server-handshake.c | |
parent | f93045296870cb6938d9b4356a4f3198cbebe3ba (diff) |
protocol/server: Make conn object ref-counted
Change-Id: I992a7f8a75edfe7d75afaa1abe0ad45e8f351c8b
BUG: 796581
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2806
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/protocol/server/src/server-handshake.c')
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index 374f5a49ae7..d1e3659ab26 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -356,6 +356,7 @@ server_setvolume (rpcsvc_request_t *req) int32_t mgmt_version = 0; uint32_t lk_version = 0; char *buf = NULL; + gf_boolean_t cancelled = _gf_false; params = dict_new (); reply = dict_new (); @@ -430,7 +431,9 @@ server_setvolume (rpcsvc_request_t *req) goto fail; } - server_cancel_conn_timer (this, conn); + cancelled = server_cancel_conn_timer (this, conn); + if (cancelled) + server_conn_unref (conn); if (conn->lk_version != 0 && conn->lk_version != lk_version) { (void) server_connection_cleanup (this, conn); @@ -720,7 +723,7 @@ server_set_lk_version (rpcsvc_request_t *req) conn = server_connection_get (this, args.uid); conn->lk_version = args.lk_ver; - server_connection_put (this, conn); + server_conn_unref (conn); rsp.lk_ver = args.lk_ver; |