From 89ec6582d1977c98372cb69f6471fcfde8437bb7 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 15 Sep 2010 06:46:48 +0000 Subject: rpc: add ref/unref for rpc clnt Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1594 (make probe oneway) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1594 --- rpc/rpc-lib/src/rpc-clnt.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rpc/rpc-lib/src/rpc-clnt.h') diff --git a/rpc/rpc-lib/src/rpc-clnt.h b/rpc/rpc-lib/src/rpc-clnt.h index ab95608a..f5fe17f5 100644 --- a/rpc/rpc-lib/src/rpc-clnt.h +++ b/rpc/rpc-lib/src/rpc-clnt.h @@ -183,6 +183,7 @@ struct rpc_clnt { struct mem_pool *saved_frames_pool; glusterfs_ctx_t *ctx; + int refcount; }; @@ -216,6 +217,12 @@ int rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog, int rsphdr_count, struct iovec *rsp_payload, int rsp_payload_count, struct iobref *rsp_iobref); +struct rpc_clnt * +rpc_clnt_ref (struct rpc_clnt *rpc); + +struct rpc_clnt * +rpc_clnt_unref (struct rpc_clnt *rpc); + void rpc_clnt_destroy (struct rpc_clnt *rpc); void rpc_clnt_set_connected (rpc_clnt_connection_t *conn); -- cgit