From 01923eed1115e53c5be9fba3e72f75c7c631bf95 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 29 Jun 2010 05:36:30 +0000 Subject: minor fixes in rpc + protocol * proper use of mem_acct_init in client.c/server.c * fentrylk_resume to be called instead of finodelk_resume in server_fentrylk(). * handle the case of xdr decoding failure on server by sending the proper error reply to client, so there is no missing frame. * removed unwanted functions from server-helpers.c 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 --- rpc/rpc-lib/src/rpcsvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index e07cb8ee7..c39a88088 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -1168,7 +1168,7 @@ rpcsvc_handle_rpc_call (rpcsvc_conn_t *conn, rpc_transport_pollin_t *msg) if (!actor) goto err_reply; - if (actor) { + if (actor && (req->rpc_err == SUCCESS)) { if (req->vectorediob) { if (actor->vector_actor) { rpcsvc_conn_ref (conn); @@ -1189,7 +1189,7 @@ rpcsvc_handle_rpc_call (rpcsvc_conn_t *conn, rpc_transport_pollin_t *msg) } err_reply: - if (ret == RPCSVC_ACTOR_ERROR) + if ((ret == RPCSVC_ACTOR_ERROR) || (req->rpc_err != SUCCESS)) ret = rpcsvc_error_reply (req); /* No need to propagate error beyond this function since the reply -- cgit