mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
Test was reversed for ERRmoredata in cli_read.
Jeremy.
This commit is contained in:
parent
1cf0cfa1b7
commit
1a36ac60be
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user