summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-09-14 19:09:54 -0700
committerJeremy Allison <jra@samba.org>2009-09-14 19:09:54 -0700
commit24309bdb2efca36375f3c833f72ebec3908d31fd (patch)
treeee03b0d8ca449a083ee57a3a82ffbcee46201726 /source3
parentf3cc05b96d8eb7ea5a7424c26e63222ff70fbd98 (diff)
downloadsamba-24309bdb2efca36375f3c833f72ebec3908d31fd.tar.gz
samba-24309bdb2efca36375f3c833f72ebec3908d31fd.tar.bz2
samba-24309bdb2efca36375f3c833f72ebec3908d31fd.zip
Second part of bug fix for 6606.
s3:libsmb: Fix bug 6606 -- short reads in smbclient were not handled
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clireadwrite.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index b6901961d0..6342de484c 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;