diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-02 19:22:22 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-04 20:32:50 +0200 |
commit | 867626abcad88b84684e9d328abf51d4f410a1cb (patch) | |
tree | a15ee1aefc33c3c1278e8ab955dcb8db38ab5463 /source3/client | |
parent | 2ff73f0df3257c27cb3cdae779e679de3170be17 (diff) | |
download | samba-867626abcad88b84684e9d328abf51d4f410a1cb.tar.gz samba-867626abcad88b84684e9d328abf51d4f410a1cb.tar.xz samba-867626abcad88b84684e9d328abf51d4f410a1cb.zip |
s3: Convert cli_list() to return NTSTATUS
If needed, the callback functions can count themselves
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 7f804bf809..d4395818a7 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -865,10 +865,13 @@ void do_list(const char *mask, } else { /* check for dfs */ if (cli_resolve_path(ctx, "", auth_info, cli, mask, &targetcli, &targetpath)) { - if (cli_list(targetcli, targetpath, attribute, - do_list_helper, targetcli) == -1) { + NTSTATUS status; + + status = cli_list(targetcli, targetpath, attribute, + do_list_helper, targetcli); + if (!NT_STATUS_IS_OK(status)) { d_printf("%s listing %s\n", - cli_errstr(targetcli), targetpath); + nt_errstr(status), targetpath); } TALLOC_FREE(targetpath); } else { @@ -4281,6 +4284,7 @@ static char **remote_completion(const char *text, int len) struct cli_state *targetcli = NULL; int i; struct completion_remote info = { NULL, NULL, 1, 0, NULL, 0 }; + NTSTATUS status; /* can't have non-static initialisation on Sun CC, so do it at run time here */ @@ -4339,8 +4343,9 @@ static char **remote_completion(const char *text, int len) if (!cli_resolve_path(ctx, "", auth_info, cli, dirmask, &targetcli, &targetpath)) { goto cleanup; } - if (cli_list(targetcli, targetpath, aDIR | aSYSTEM | aHIDDEN, - completion_remote_filter, (void *)&info) < 0) { + status = cli_list(targetcli, targetpath, aDIR | aSYSTEM | aHIDDEN, + completion_remote_filter, (void *)&info); + if (!NT_STATUS_IS_OK(status)) { goto cleanup; } |