From 9c59af4da5a2b3a19cab99e978be40b2272ef59b Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 5 Jan 2011 12:16:56 -0500 Subject: [PATCH] fixes for bind_conn_to_session() fixes for xdr encoding of bind_conn_to_session, after testing against linux server Signed-off-by: Casey Bodley --- daemon/nfs41_compound.c | 5 +++-- daemon/nfs41_ops.c | 4 +--- daemon/nfs41_xdr.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/daemon/nfs41_compound.c b/daemon/nfs41_compound.c index aa4c4c7..c6b7a82 100644 --- a/daemon/nfs41_compound.c +++ b/daemon/nfs41_compound.c @@ -68,10 +68,11 @@ void compound_add_op( void *res) { const uint32_t i = compound->args.argarray_count++; + const uint32_t j = compound->res.resarray_count++; compound->args.argarray[i].op = opnum; compound->args.argarray[i].arg = arg; - - compound->res.resarray[compound->res.resarray_count++].res = res; + compound->res.resarray[j].op = opnum; + compound->res.resarray[j].res = res; } /* Due to the possibility of replays, we might get a response to a different diff --git a/daemon/nfs41_ops.c b/daemon/nfs41_ops.c index ac36efe..59722fc 100644 --- a/daemon/nfs41_ops.c +++ b/daemon/nfs41_ops.c @@ -180,8 +180,6 @@ enum nfsstat4 nfs41_bind_conn_to_session( { int status; nfs41_compound compound; - nfs41_compound_args *compound_args = &compound.args; - nfs41_compound_res *compound_res = &compound.res; nfs_argop4 argop; nfs_resop4 resop; nfs41_bind_conn_to_session_args bind_args; @@ -195,7 +193,7 @@ enum nfsstat4 nfs41_bind_conn_to_session( ZeroMemory(&bind_res, sizeof(bind_res)); status = nfs41_send_compound(rpc, - (char*)&compound_args, (char*)&compound_res); + (char*)&compound.args, (char*)&compound.res); if (status) goto out; diff --git a/daemon/nfs41_xdr.c b/daemon/nfs41_xdr.c index 081c623..90d0b1f 100644 --- a/daemon/nfs41_xdr.c +++ b/daemon/nfs41_xdr.c @@ -3056,7 +3056,7 @@ static const op_table_entry g_op_table[] = { { encode_op_write, decode_op_write }, /* OP_WRITE = 38 */ { NULL, NULL }, /* OP_RELEASE_LOCKOWNER = 39 */ { NULL, NULL }, /* OP_BACKCHANNEL_CTL = 40 */ - { NULL, NULL }, /* OP_BIND_CONN_TO_SESSION = 41 */ + { encode_op_bind_conn_to_session, decode_op_bind_conn_to_session }, /* OP_BIND_CONN_TO_SESSION = 41 */ { encode_op_exchange_id, decode_op_exchange_id }, /* OP_EXCHANGE_ID = 42 */ { encode_op_create_session, decode_op_create_session }, /* OP_CREATE_SESSION = 43 */ { encode_op_destroy_session, decode_op_destroy_session }, /* OP_DESTROY_SESSION = 44 */