summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-27 19:11:46 +0000
committerJeremy Allison <jra@samba.org>2002-11-27 19:11:46 +0000
commit296c93923c643fbbf1720af2f647f29aea708bd5 (patch)
treece1545170c71d9a3f42e9a5ac9ebae41a6eb4260 /source3/libsmb
parentdbb2ecddaabce7a9118a4529eb36261942492d2f (diff)
downloadsamba-296c93923c643fbbf1720af2f647f29aea708bd5.tar.gz
samba-296c93923c643fbbf1720af2f647f29aea708bd5.tar.bz2
samba-296c93923c643fbbf1720af2f647f29aea708bd5.zip
Test was reversed for ERRmoredata in cli_read.
Jeremy. (This used to be commit fff7f3cbe248982bcd70abb1da6624186bab42d2)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clireadwrite.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 875df11dca..38e8aac42a 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -84,6 +84,7 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
errors. */
if (cli_is_error(cli)) {
+ BOOL recoverable_error = False;
NTSTATUS status = NT_STATUS_OK;
uint8 eclass = 0;
uint32 ecode = 0;
@@ -93,8 +94,17 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
else
cli_dos_error(cli, &eclass, &ecode);
+ /*
+ * ERRDOS ERRmoredata or STATUS_MORE_ENRTIES is a
+ * recoverable error, plus we have valid data in the
+ * packet so don't error out here.
+ */
+
if ((eclass == ERRDOS && ecode == ERRmoredata) ||
NT_STATUS_V(status) == NT_STATUS_V(STATUS_MORE_ENTRIES))
+ recoverable_error = True;
+
+ if (!recoverable_error)
return -1;
}