summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-02 19:22:22 +0200
committerVolker Lendecke <vl@samba.org>2010-08-04 20:32:50 +0200
commit867626abcad88b84684e9d328abf51d4f410a1cb (patch)
treea15ee1aefc33c3c1278e8ab955dcb8db38ab5463 /source3/utils
parent2ff73f0df3257c27cb3cdae779e679de3170be17 (diff)
downloadsamba-867626abcad88b84684e9d328abf51d4f410a1cb.tar.gz
samba-867626abcad88b84684e9d328abf51d4f410a1cb.tar.bz2
samba-867626abcad88b84684e9d328abf51d4f410a1cb.zip
s3: Convert cli_list() to return NTSTATUS
If needed, the callback functions can count themselves
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index cafab87a96..d27545d1c6 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -3452,6 +3452,7 @@ static bool sync_files(struct copy_clistate *cp_clistate, const char *mask)
{
struct cli_state *targetcli;
char *targetpath = NULL;
+ NTSTATUS status;
DEBUG(3,("calling cli_list with mask: %s\n", mask));
@@ -3463,9 +3464,11 @@ static bool sync_files(struct copy_clistate *cp_clistate, const char *mask)
return false;
}
- if (cli_list(targetcli, targetpath, cp_clistate->attribute, copy_fn, cp_clistate) == -1) {
+ status = cli_list(targetcli, targetpath, cp_clistate->attribute,
+ copy_fn, cp_clistate);
+ if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, _("listing %s failed with error: %s\n"),
- mask, cli_errstr(targetcli));
+ mask, nt_errstr(status));
return false;
}