summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src/portmap-xdr.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-08-29 17:53:24 +0530
committerAnand Avati <avati@gluster.com>2011-09-07 10:48:52 -0700
commitf0f3b040dfa062021d3a193e5a19c380eb5e908d (patch)
tree5e78d2dc05a2aa143b68b0980e21f09511c9120b /rpc/xdr/src/portmap-xdr.c
parentf78c8253d7fb75762effcf64683cbce10783a55b (diff)
modify to the way we used XDR definitions files (.x files)
Earlier: step 1: copy the existing <xdr>.x files to /tmp step 2: generate '.[ch]' files using 'rpcgen <xdr>.x' step 3: check diff with the to the existing files, add only your part of changes back to the original file. (ignore other changes). step 4: there is another file to write wrapper functions to convert structures to/from XDR buffers, update it with your new structure. step 5: use these wrapper functions in the newly written procedures. step 6: commit :-| Now: step 1: update (mostly adding only) the <xdr>.x file step 2: run '<path-to-src>/extras/generate-xdr-files.sh <xdr>.x' command step 3: implement rpc procedure to handle the request/response. step 4: commit :-) Change-Id: I219f9159fc980438c86e847c6b030be96e595ea2 BUG: 3488 Reviewed-on: http://review.gluster.com/341 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'rpc/xdr/src/portmap-xdr.c')
-rw-r--r--rpc/xdr/src/portmap-xdr.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/rpc/xdr/src/portmap-xdr.c b/rpc/xdr/src/portmap-xdr.c
index 436e974a871..993a718c85b 100644
--- a/rpc/xdr/src/portmap-xdr.c
+++ b/rpc/xdr/src/portmap-xdr.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2010-2011 Gluster, Inc. <http://www.gluster.com>
+ Copyright (c) 2007-2011 Gluster, Inc. <http://www.gluster.com>
This file is part of GlusterFS.
GlusterFS is free software; you can redistribute it and/or modify
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>.
*/
+#include "xdr-common.h"
/*
* Please do not edit this file.
@@ -24,11 +25,13 @@
*/
#include "portmap-xdr.h"
-#include "compat.h"
bool_t
xdr_pmap_port_by_brick_req (XDR *xdrs, pmap_port_by_brick_req *objp)
{
+ register int32_t *buf;
+ buf = NULL;
+
if (!xdr_string (xdrs, &objp->brick, ~0))
return FALSE;
return TRUE;
@@ -38,6 +41,7 @@ bool_t
xdr_pmap_port_by_brick_rsp (XDR *xdrs, pmap_port_by_brick_rsp *objp)
{
register int32_t *buf;
+ buf = NULL;
if (xdrs->x_op == XDR_ENCODE) {
@@ -92,6 +96,9 @@ xdr_pmap_port_by_brick_rsp (XDR *xdrs, pmap_port_by_brick_rsp *objp)
bool_t
xdr_pmap_brick_by_port_req (XDR *xdrs, pmap_brick_by_port_req *objp)
{
+ register int32_t *buf;
+ buf = NULL;
+
if (!xdr_int (xdrs, &objp->port))
return FALSE;
return TRUE;
@@ -101,6 +108,7 @@ bool_t
xdr_pmap_brick_by_port_rsp (XDR *xdrs, pmap_brick_by_port_rsp *objp)
{
register int32_t *buf;
+ buf = NULL;
if (xdrs->x_op == XDR_ENCODE) {
@@ -155,6 +163,9 @@ xdr_pmap_brick_by_port_rsp (XDR *xdrs, pmap_brick_by_port_rsp *objp)
bool_t
xdr_pmap_signup_req (XDR *xdrs, pmap_signup_req *objp)
{
+ register int32_t *buf;
+ buf = NULL;
+
if (!xdr_string (xdrs, &objp->brick, ~0))
return FALSE;
if (!xdr_int (xdrs, &objp->port))
@@ -165,6 +176,9 @@ xdr_pmap_signup_req (XDR *xdrs, pmap_signup_req *objp)
bool_t
xdr_pmap_signup_rsp (XDR *xdrs, pmap_signup_rsp *objp)
{
+ register int32_t *buf;
+ buf = NULL;
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -175,6 +189,9 @@ xdr_pmap_signup_rsp (XDR *xdrs, pmap_signup_rsp *objp)
bool_t
xdr_pmap_signin_req (XDR *xdrs, pmap_signin_req *objp)
{
+ register int32_t *buf;
+ buf = NULL;
+
if (!xdr_string (xdrs, &objp->brick, ~0))
return FALSE;
if (!xdr_int (xdrs, &objp->port))
@@ -185,6 +202,9 @@ xdr_pmap_signin_req (XDR *xdrs, pmap_signin_req *objp)
bool_t
xdr_pmap_signin_rsp (XDR *xdrs, pmap_signin_rsp *objp)
{
+ register int32_t *buf;
+ buf = NULL;
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -195,6 +215,9 @@ xdr_pmap_signin_rsp (XDR *xdrs, pmap_signin_rsp *objp)
bool_t
xdr_pmap_signout_req (XDR *xdrs, pmap_signout_req *objp)
{
+ register int32_t *buf;
+ buf = NULL;
+
if (!xdr_string (xdrs, &objp->brick, ~0))
return FALSE;
if (!xdr_int (xdrs, &objp->port))
@@ -205,6 +228,9 @@ xdr_pmap_signout_req (XDR *xdrs, pmap_signout_req *objp)
bool_t
xdr_pmap_signout_rsp (XDR *xdrs, pmap_signout_rsp *objp)
{
+ register int32_t *buf;
+ buf = NULL;
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))