summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2012-08-20 09:46:33 -0700
committerVijay Bellur <vbellur@redhat.com>2012-08-20 20:41:11 -0700
commitfb1d42df1679332f2a729b16171b0c72383c9918 (patch)
tree72a92e83d125284117e8937b174c6705810135ef /rpc
parentdefc74df52c0afdd10736f21ca7d5a2a4c2cd0e6 (diff)
rpcsvc: remove .vector_actor and related changes
The .vector_actor method of rpcsvc_actor_desc is defunct now after rpc unification. Remove the field and all related usage of it. Change-Id: I53048cebeae78f50259e8c4a7fec3497691fe388 BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3832 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c35
-rw-r--r--rpc/rpc-lib/src/rpcsvc.h3
2 files changed, 17 insertions, 21 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index 63412342689..972461a0a93 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -435,6 +435,7 @@ rpcsvc_handle_rpc_call (rpcsvc_t *svc, rpc_transport_t *trans,
rpc_transport_pollin_t *msg)
{
rpcsvc_actor_t *actor = NULL;
+ rpcsvc_actor actor_fn = NULL;
rpcsvc_request_t *req = NULL;
int ret = -1;
uint16_t port = 0;
@@ -497,21 +498,19 @@ rpcsvc_handle_rpc_call (rpcsvc_t *svc, rpc_transport_t *trans,
/* Before going to xlator code, set the THIS properly */
THIS = svc->mydata;
- if (req->count == 2) {
- if (actor->vector_actor) {
- ret = actor->vector_actor (req, &req->msg[1], 1,
- req->iobref);
- } else {
- rpcsvc_request_seterr (req, PROC_UNAVAIL);
- /* LOG TODO: print more info about procnum,
- prognum etc, also print transport info */
- gf_log (GF_RPCSVC, GF_LOG_ERROR,
- "No vectored handler present");
- ret = RPCSVC_ACTOR_ERROR;
- }
- } else if (actor->actor) {
- ret = actor->actor (req);
- }
+ actor_fn = actor->actor;
+
+ if (!actor_fn) {
+ rpcsvc_request_seterr (req, PROC_UNAVAIL);
+ /* LOG TODO: print more info about procnum,
+ prognum etc, also print transport info */
+ gf_log (GF_RPCSVC, GF_LOG_ERROR,
+ "No vectored handler present");
+ ret = RPCSVC_ACTOR_ERROR;
+ goto err_reply;
+ }
+
+ ret = actor_fn (req);
}
err_reply:
@@ -2429,9 +2428,9 @@ out:
rpcsvc_actor_t gluster_dump_actors[] = {
- [GF_DUMP_NULL] = {"NULL", GF_DUMP_NULL, NULL, NULL, NULL, 0},
- [GF_DUMP_DUMP] = {"DUMP", GF_DUMP_DUMP, rpcsvc_dump, NULL, NULL, 0},
- [GF_DUMP_MAXVALUE] = {"MAXVALUE", GF_DUMP_MAXVALUE, NULL, NULL, NULL, 0},
+ [GF_DUMP_NULL] = {"NULL", GF_DUMP_NULL, NULL, NULL, 0},
+ [GF_DUMP_DUMP] = {"DUMP", GF_DUMP_DUMP, rpcsvc_dump, NULL, 0},
+ [GF_DUMP_MAXVALUE] = {"MAXVALUE", GF_DUMP_MAXVALUE, NULL, NULL, 0},
};
diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h
index 847ec1b336e..9f526cb05cd 100644
--- a/rpc/rpc-lib/src/rpcsvc.h
+++ b/rpc/rpc-lib/src/rpcsvc.h
@@ -276,8 +276,6 @@ struct rpcsvc_request {
*
*/
typedef int (*rpcsvc_actor) (rpcsvc_request_t *req);
-typedef int (*rpcsvc_vector_actor) (rpcsvc_request_t *req, struct iovec *vec,
- int count, struct iobref *iobref);
typedef int (*rpcsvc_vector_sizer) (int state, ssize_t *readsize,
char *base_addr, char *curr_addr);
@@ -311,7 +309,6 @@ typedef struct rpcsvc_actor_desc {
* handler for letting the RPC program read the data from the network
* directly into its aligned buffers.
*/
- rpcsvc_vector_actor vector_actor;
rpcsvc_vector_sizer vector_sizer;
/* Can actor be ran on behalf an unprivileged requestor? */