diff options
author | Björn Baumbach <bb@sernet.de> | 2011-07-22 12:35:03 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-23 09:18:26 +0200 |
commit | bffc521a8aa00ece7d330c6735c8ca787c91ba61 (patch) | |
tree | 6459e1c406b11f90913462a69b761e2e4d73ced5 /source3 | |
parent | 6d695749c741cf021ed8df1fa40f6fd8a25cf4a1 (diff) | |
download | samba-bffc521a8aa00ece7d330c6735c8ca787c91ba61.tar.gz samba-bffc521a8aa00ece7d330c6735c8ca787c91ba61.tar.bz2 samba-bffc521a8aa00ece7d330c6735c8ca787c91ba61.zip |
s3-client/clitar.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/client/clitar.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 88824617a0..cc642c330e 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -616,7 +616,7 @@ static NTSTATUS do_atar(const char *rname_in, char *lname, bool shallitime=True; char *data = NULL; int read_size = 65520; - int datalen=0; + size_t datalen=0; char *rname = NULL; TALLOC_CTX *ctx = talloc_stackframe(); NTSTATUS status = NT_STATUS_OK; @@ -693,10 +693,9 @@ static NTSTATUS do_atar(const char *rname_in, char *lname, DEBUG(3,("nread=%.0f\n",(double)nread)); - datalen = cli_read_old(cli, fnum, data, nread, read_size); - - if (datalen == -1) { - status = cli_nt_error(cli); + status = cli_read(cli, fnum, data, nread, + read_size, &datalen); + if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("Error reading file %s : %s\n", rname, nt_errstr(status))); break; |