bumping seq if decoded successfully

before, we would not bump the sequence if we couldn't decode an
operation in the received compound.
This commit is contained in:
U-fast\aglo 2010-10-12 11:52:08 -04:00 committed by unknown
parent cf75520410
commit f01f1304da

View file

@ -149,14 +149,7 @@ retry:
set_expected_res(compound); set_expected_res(compound);
status = nfs41_send_compound(session->client->rpc, status = nfs41_send_compound(session->client->rpc,
(char *)&compound->args, (char *)&compound->res); (char *)&compound->args, (char *)&compound->res);
// bump sequence number if sequence op succeeded.
if (status) {
eprintf("nfs41_send_compound failed %d for seqid=%d, slotid=%d\n",
status, args->sa_sequenceid, args->sa_slotid);
status = NFS4ERR_IO;
goto out_free_slot;
} else {
// bump sequence number if sequence op succeeded
if (compound->res.resarray_count > 0 && if (compound->res.resarray_count > 0 &&
compound->res.resarray[0].op == OP_SEQUENCE) { compound->res.resarray[0].op == OP_SEQUENCE) {
nfs41_sequence_res *seq = nfs41_sequence_res *seq =
@ -187,6 +180,12 @@ retry:
goto out_free_slot; goto out_free_slot;
} }
} }
if (status) {
eprintf("nfs41_send_compound failed %d for seqid=%d, slotid=%d\n",
status, args->sa_sequenceid, args->sa_slotid);
status = NFS4ERR_IO;
goto out_free_slot;
} }
if (compound->res.status != NFS4_OK) if (compound->res.status != NFS4_OK)