From 25c220cf505c71139afe0cefe5a04b7e435f77ba Mon Sep 17 00:00:00 2001 From: Harshavardhana Ranganath Date: Wed, 25 Nov 2009 13:15:36 +0000 Subject: Added boundaries for each fops, mops and cbks. Signed-off-by: Harshavardhana Signed-off-by: Anand V. Avati BUG: 366 (Infinite loop with centralized logging.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=366 --- xlators/protocol/client/src/client-protocol.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'xlators/protocol/client') diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c index bee6424cd93..b1def9735e7 100644 --- a/xlators/protocol/client/src/client-protocol.c +++ b/xlators/protocol/client/src/client-protocol.c @@ -60,9 +60,9 @@ protocol_client_xfer (call_frame_t *frame, xlator_t *this, transport_t *trans, int protocol_client_post_handshake (call_frame_t *frame, xlator_t *this); -static gf_op_t gf_fops[]; -static gf_op_t gf_mops[]; -static gf_op_t gf_cbks[]; +static gf_op_t gf_fops[GF_FOP_MAXVALUE]; +static gf_op_t gf_mops[GF_MOP_MAXVALUE]; +static gf_op_t gf_cbks[GF_CBK_MAXVALUE]; transport_t * @@ -538,7 +538,6 @@ out: return 0; } - int protocol_client_xfer (call_frame_t *frame, xlator_t *this, transport_t *trans, int type, int op, @@ -5603,7 +5602,8 @@ unwind: int -client_log_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen) +client_log_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen, + struct iobuf *iobuf) { gf_mop_log_rsp_t * rsp = NULL; @@ -6424,7 +6424,7 @@ static gf_op_t gf_fops[] = { [GF_FOP_XATTROP] = client_xattrop_cbk, [GF_FOP_FXATTROP] = client_fxattrop_cbk, [GF_FOP_SETATTR] = client_setattr_cbk, - [GF_FOP_FSETATTR] = client_fsetattr_cbk, + [GF_FOP_FSETATTR] = client_fsetattr_cbk }; static gf_op_t gf_mops[] = { @@ -6434,6 +6434,7 @@ static gf_op_t gf_mops[] = { [GF_MOP_SETSPEC] = client_setspec_cbk, [GF_MOP_GETSPEC] = client_getspec_cbk, [GF_MOP_PING] = client_ping_cbk, + [GF_MOP_LOG] = client_log_cbk }; static gf_op_t gf_cbks[] = { -- cgit