diff options
author | Amar Tumballi <amar@gluster.com> | 2010-06-24 07:58:51 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-06-25 03:16:36 -0700 |
commit | 29893bcba579f7e37a6ace018ffda1c8abe45550 (patch) | |
tree | 88cd08652635723569fb4401485e07a0460b43a5 /xlators/protocol/rpc/rpc-lib/src/rpc-clnt.c | |
parent | b8b2a9d2f49686d5056fb0ce6150cf9c54180b12 (diff) |
added proper mem-types to GF_CALLOC in protocol
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@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/protocol/rpc/rpc-lib/src/rpc-clnt.c')
-rw-r--r-- | xlators/protocol/rpc/rpc-lib/src/rpc-clnt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.c b/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.c index da02b9f4230..84fdb9bb55f 100644 --- a/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.c +++ b/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.c @@ -68,7 +68,8 @@ __saved_frames_put (struct saved_frames *frames, void *frame, int32_t procnum, { struct saved_frame *saved_frame = NULL; - saved_frame = GF_CALLOC (sizeof (*saved_frame), 1, 0); + saved_frame = GF_CALLOC (1, sizeof (*saved_frame), + gf_common_mt_rpcclnt_savedframe_t); if (!saved_frame) { gf_log ("rpc-clnt", GF_LOG_ERROR, "out of memory"); goto out; @@ -234,7 +235,8 @@ saved_frames_new (void) { struct saved_frames *saved_frames = NULL; - saved_frames = GF_CALLOC (sizeof (*saved_frames), 1, 0); + saved_frames = GF_CALLOC (1, sizeof (*saved_frames), + gf_common_mt_rpcclnt_savedframe_t); if (!saved_frames) { gf_log ("rpc-clnt", GF_LOG_ERROR, "out of memory"); return NULL; @@ -876,13 +878,14 @@ rpc_clnt_init (struct rpc_clnt_config *config, dict_t *options, int ret = -1; struct rpc_clnt *rpc = NULL; - rpc = GF_CALLOC (1, sizeof (*rpc), 0); + rpc = GF_CALLOC (1, sizeof (*rpc), gf_common_mt_rpcclnt_t); if (!rpc) { gf_log ("rpc-clnt", GF_LOG_ERROR, "out of memory"); goto out; } pthread_mutex_init (&rpc->lock, NULL); + rpc->ctx = ctx; ret = rpc_clnt_connection_init (rpc, ctx, options, name); if (ret == -1) { @@ -891,7 +894,6 @@ rpc_clnt_init (struct rpc_clnt_config *config, dict_t *options, rpc = NULL; goto out; } - rpc->ctx = ctx; out: return rpc; } |