summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-07-22 12:44:56 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-23 09:18:27 +0200
commitaffc9d4b610305dd6f4142869399befc58056ae6 (patch)
tree8a7af5aa5fcb2af58e332f584a17ebe1fd5cdf2a
parentbffc521a8aa00ece7d330c6735c8ca787c91ba61 (diff)
downloadsamba-affc9d4b610305dd6f4142869399befc58056ae6.tar.gz
samba-affc9d4b610305dd6f4142869399befc58056ae6.tar.bz2
samba-affc9d4b610305dd6f4142869399befc58056ae6.zip
s3-libgpo/gpo_filesync.c: return on read error
replace cli_read_old() with cli_read() Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/libgpo/gpo_filesync.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libgpo/gpo_filesync.c b/source3/libgpo/gpo_filesync.c
index cdcdcfbf72..ead9261d16 100644
--- a/source3/libgpo/gpo_filesync.c
+++ b/source3/libgpo/gpo_filesync.c
@@ -66,10 +66,14 @@ NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
}
while (1) {
+ size_t n = 0;
- int n = cli_read_old(cli, fnum, data, nread, read_size);
+ result = cli_read(cli, fnum, data, nread, read_size, &n);
+ if (!NT_STATUS_IS_OK(result)) {
+ goto out;
+ }
- if (n <= 0)
+ if (n == 0)
break;
if (write(fd, data, n) != n) {