From 29893bcba579f7e37a6ace018ffda1c8abe45550 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 24 Jun 2010 07:58:51 +0000 Subject: added proper mem-types to GF_CALLOC in protocol Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati 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 --- xlators/protocol/rpc/rpc-transport/socket/src/socket.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xlators/protocol/rpc/rpc-transport/socket/src/socket.c') diff --git a/xlators/protocol/rpc/rpc-transport/socket/src/socket.c b/xlators/protocol/rpc/rpc-transport/socket/src/socket.c index 5e56ff980..4ca7121e8 100644 --- a/xlators/protocol/rpc/rpc-transport/socket/src/socket.c +++ b/xlators/protocol/rpc/rpc-transport/socket/src/socket.c @@ -396,7 +396,7 @@ __socket_ioq_new (rpc_transport_t *this, rpc_transport_msg_t *msg) priv = this->private; /* TODO: use mem-pool */ - entry = GF_CALLOC (1, sizeof (*entry), 0); + entry = GF_CALLOC (1, sizeof (*entry), gf_common_mt_ioq); if (!entry) return NULL; @@ -1054,7 +1054,7 @@ __socket_read_reply (rpc_transport_t *this) buf = rpc_xid_addr (iobuf_ptr (priv->incoming.iobuf)); - request_info = GF_CALLOC (1, sizeof (*request_info), 0); + request_info = GF_CALLOC (1, sizeof (*request_info), gf_common_mt_rpc_trans_reqinfo_t); if (request_info == NULL) { gf_log (this->name, GF_LOG_ERROR, "out of memory"); goto out; @@ -1501,7 +1501,8 @@ socket_server_event_handler (int fd, int idx, void *data, } } - new_trans = GF_CALLOC (1, sizeof (*new_trans), 0); + new_trans = GF_CALLOC (1, sizeof (*new_trans), + gf_common_mt_rpc_trans_t); new_trans->fini = this->fini; new_trans->name = gf_strdup (this->name); @@ -2152,7 +2153,7 @@ socket_init (rpc_transport_t *this) return -1; } - priv = GF_CALLOC (1, sizeof (*priv), 0); + priv = GF_CALLOC (1, sizeof (*priv), gf_common_mt_socket_private_t); if (!priv) { gf_log (this->name, GF_LOG_ERROR, "calloc (1, %"GF_PRI_SIZET") returned NULL", -- cgit