From 4b6713e7cc43ecc3637203884b22efeb839407c3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 28 Aug 2007 15:09:47 +0000 Subject: r24744: Increase length by what we got from recv, not from ioctl (This used to be commit 23c8f4f74bfb761894034ce9375258411c80d74d) --- source3/lib/packet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/lib/packet.c b/source3/lib/packet.c index a3a33643ff8..c5335bcf15e 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; } -- cgit