summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src/glusterd1-xdr.c
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-09-10 07:32:29 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-10 06:14:02 -0700
commit6858155d8b0681f9caea5295a2de63252ff9631c (patch)
tree73b98f8c318cfa4a22c3b71960a4004a1c81bd2a /rpc/xdr/src/glusterd1-xdr.c
parent5bec5e4fd6b0cae5e7a5e4d0a72090f4d613b94e (diff)
mgmt/glusterd: add a dict to glusterd commit response.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1582 (replace-brick data missing added brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1582
Diffstat (limited to 'rpc/xdr/src/glusterd1-xdr.c')
-rw-r--r--rpc/xdr/src/glusterd1-xdr.c49
1 files changed, 47 insertions, 2 deletions
diff --git a/rpc/xdr/src/glusterd1-xdr.c b/rpc/xdr/src/glusterd1-xdr.c
index 82d9830c97f..3ddd5568826 100644
--- a/rpc/xdr/src/glusterd1-xdr.c
+++ b/rpc/xdr/src/glusterd1-xdr.c
@@ -17,7 +17,6 @@
<http://www.gnu.org/licenses/>.
*/
-
/*
* Please do not edit this file.
* It was generated using rpcgen.
@@ -28,7 +27,6 @@
bool_t
xdr_glusterd_volume_status (XDR *xdrs, glusterd_volume_status *objp)
{
-
if (!xdr_enum (xdrs, (enum_t *) objp))
return FALSE;
return TRUE;
@@ -223,6 +221,51 @@ xdr_gd1_mgmt_commit_op_req (XDR *xdrs, gd1_mgmt_commit_op_req *objp)
bool_t
xdr_gd1_mgmt_commit_op_rsp (XDR *xdrs, gd1_mgmt_commit_op_rsp *objp)
{
+ register int32_t *buf;
+
+ if (xdrs->x_op == XDR_ENCODE) {
+ if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
+ buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+ if (buf == NULL) {
+ if (!xdr_int (xdrs, &objp->op))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_ret))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_errno))
+ return FALSE;
+
+ } else {
+ IXDR_PUT_LONG(buf, objp->op);
+ IXDR_PUT_LONG(buf, objp->op_ret);
+ IXDR_PUT_LONG(buf, objp->op_errno);
+ }
+ if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ return FALSE;
+ return TRUE;
+ } else if (xdrs->x_op == XDR_DECODE) {
+ if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
+ sizeof (u_char), (xdrproc_t) xdr_u_char))
+ return FALSE;
+ buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+ if (buf == NULL) {
+ if (!xdr_int (xdrs, &objp->op))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_ret))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_errno))
+ return FALSE;
+
+ } else {
+ objp->op = IXDR_GET_LONG(buf);
+ objp->op_ret = IXDR_GET_LONG(buf);
+ objp->op_errno = IXDR_GET_LONG(buf);
+ }
+ if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ return FALSE;
+ return TRUE;
+ }
if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
sizeof (u_char), (xdrproc_t) xdr_u_char))
@@ -233,6 +276,8 @@ xdr_gd1_mgmt_commit_op_rsp (XDR *xdrs, gd1_mgmt_commit_op_rsp *objp)
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
return FALSE;
+ if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ return FALSE;
return TRUE;
}