From: Volker Lendecke Date: Tue, 15 Sep 2009 02:09:54 +0000 (-0700) Subject: Second part of bug fix for 6606. X-Git-Tag: talloc-2.0.1~518^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24309bdb2efc;p=thirdparty%2Fsamba.git Second part of bug fix for 6606. s3:libsmb: Fix bug 6606 -- short reads in smbclient were not handled --- diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index b6901961d06..6342de484c2 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -287,6 +287,12 @@ static void cli_readall_done(struct tevent_req *subreq) return; } + if (received == 0) { + /* EOF */ + tevent_req_done(req); + return; + } + if ((state->received == 0) && (received == state->size)) { /* Ideal case: Got it all in one run */ state->buf = buf;