summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-08-28 15:09:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:17 -0500
commit4b6713e7cc43ecc3637203884b22efeb839407c3 (patch)
tree756dfc7004cfa34a89ed875e590e1504ea827af2
parent068d95cde19f339d71b3566f16eed0e5d6ab9d46 (diff)
downloadsamba-4b6713e7cc43ecc3637203884b22efeb839407c3.tar.gz
samba-4b6713e7cc43ecc3637203884b22efeb839407c3.tar.bz2
samba-4b6713e7cc43ecc3637203884b22efeb839407c3.zip
r24744: Increase length by what we got from recv, not from ioctl
(This used to be commit 23c8f4f74bfb761894034ce9375258411c80d74d)
-rw-r--r--source3/lib/packet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/packet.c b/source3/lib/packet.c
index a3a33643ff..c5335bcf15 100644
--- a/source3/lib/packet.c
+++ b/source3/lib/packet.c
@@ -83,6 +83,8 @@ NTSTATUS packet_fd_read(struct packet_context *ctx)
return NT_STATUS_NO_MEMORY;
}
+ ctx->in.data = in;
+
res = recv(ctx->fd, in + ctx->in.length, available, 0);
if (res < 0) {
@@ -94,8 +96,7 @@ NTSTATUS packet_fd_read(struct packet_context *ctx)
return NT_STATUS_END_OF_FILE;
}
- ctx->in.data = in;
- ctx->in.length += available;
+ ctx->in.length += res;
return NT_STATUS_OK;
}