Skip to content

Commit

Permalink
nfs: fix write in embedded client
Browse files Browse the repository at this point in the history
Motivation:
as oncrpc4j have changed Xdr#xdrEncodeByteBuffer to not flip provided
buffer we should not set write buffer position to the buffer's limit to
allow data to be read.

Modification:
do not set buffers position to limit as Buffer#remaining will return
zero.

Result:
embedded nfs4 client able to write.

Acked-by: Albert Rossi
Target: master, 0.17
  • Loading branch information
kofemann committed May 16, 2018
1 parent cde7790 commit f8de2ee
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ public CompoundBuilder withRemove(String path) {

public CompoundBuilder withWrite(long offset, byte[] data, stateid4 stateid) {
ByteBuffer buf = ByteBuffer.wrap(data);
buf.position(data.length);
return withWrite(offset, buf, stateid);
}

Expand Down

0 comments on commit f8de2ee

Please sign in to comment.