diff options
author | Björn Baumbach <bb@sernet.de> | 2011-07-22 14:22:29 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-23 09:18:55 +0200 |
commit | 8bdbdd46f4aca2d4a1cc0babf1300b9eb158b8bb (patch) | |
tree | 150ad13440465eae3667e92dbea8581a684635f6 /source3 | |
parent | 473b16dcbf31f385905738be56f5cba86c14cb01 (diff) | |
download | samba-8bdbdd46f4aca2d4a1cc0babf1300b9eb158b8bb.tar.gz samba-8bdbdd46f4aca2d4a1cc0babf1300b9eb158b8bb.tar.bz2 samba-8bdbdd46f4aca2d4a1cc0babf1300b9eb158b8bb.zip |
s3-libsmb/libsmb_file.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/libsmb_file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c index ebf49252e8..914b61409d 100644 --- a/source3/libsmb/libsmb_file.c +++ b/source3/libsmb/libsmb_file.c @@ -225,7 +225,7 @@ SMBC_read_ctx(SMBCCTX *context, void *buf, size_t count) { - int ret; + size_t ret; char *server = NULL, *share = NULL, *user = NULL, *password = NULL; char *path = NULL; char *targetpath = NULL; @@ -296,9 +296,9 @@ SMBC_read_ctx(SMBCCTX *context, } /*d_printf(">>>fstat: resolved path as %s\n", targetpath);*/ - ret = cli_read_old(targetcli, file->cli_fd, (char *)buf, offset, count); - - if (ret < 0) { + status = cli_read(targetcli, file->cli_fd, (char *)buf, offset, + count, &ret); + if (!NT_STATUS_IS_OK(status)) { errno = SMBC_errno(context, targetcli); TALLOC_FREE(frame); return -1; @@ -306,7 +306,7 @@ SMBC_read_ctx(SMBCCTX *context, file->offset += ret; - DEBUG(4, (" --> %d\n", ret)); + DEBUG(4, (" --> %ld\n", (unsigned long)ret)); TALLOC_FREE(frame); return ret; /* Success, ret bytes of data ... */ |