summaryrefslogtreecommitdiffstats
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-30 16:57:42 -0700
committerJeremy Allison <jra@samba.org>2009-04-30 16:57:42 -0700
commitf3af298e5b1457ba8661fd0e3f5304ad3175f3ba (patch)
tree43c32ead3cae70fc6d26b01dc2fa844dc93c9388 /source3/client
parent384c1aaa8ee8879b6cc4bc34dfc4d3c9fa11667b (diff)
downloadsamba-f3af298e5b1457ba8661fd0e3f5304ad3175f3ba.tar.gz
samba-f3af298e5b1457ba8661fd0e3f5304ad3175f3ba.tar.xz
samba-f3af298e5b1457ba8661fd0e3f5304ad3175f3ba.zip
Cause cli_close to return an NTSTATUS.
Jeremy.
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c6
-rw-r--r--source3/client/clitar.c5
-rw-r--r--source3/client/smbspool.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index becb0661534..d3cf08cce81 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1078,7 +1078,7 @@ static int do_get(const char *rname, const char *lname_in, bool reget)
return 1;
}
- if (!cli_close(targetcli, fnum)) {
+ if (!NT_STATUS_IS_OK(cli_close(targetcli, fnum))) {
d_printf("Error %s closing remote file\n",cli_errstr(cli));
rc = 1;
}
@@ -1690,7 +1690,7 @@ static int do_put(const char *rname, const char *lname, bool reput)
d_fprintf(stderr, "cli_push returned %s\n", nt_errstr(status));
}
- if (!cli_close(targetcli, fnum)) {
+ if (!NT_STATUS_IS_OK(cli_close(targetcli, fnum))) {
d_printf("%s closing remote file %s\n",cli_errstr(cli),rname);
x_fclose(f);
return 1;
@@ -2459,7 +2459,7 @@ static int cmd_close(void)
fnum = atoi(buf);
/* We really should use the targetcli here.... */
- if (!cli_close(cli, fnum)) {
+ if (!NT_STATUS_IS_OK(cli_close(cli, fnum))) {
d_printf("close %d: %s\n", fnum, cli_errstr(cli));
return 1;
}
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 3cc1a25dbbc..c7f2819c88a 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -1067,8 +1067,9 @@ static int get_file(file_info2 finfo)
/* Now close the file ... */
- if (!cli_close(cli, fnum)) {
- DEBUG(0, ("Error closing remote file\n"));
+ if (!NT_STATUS_IS_OK(cli_close(cli, fnum))) {
+ DEBUG(0, ("Error %s closing remote file\n",
+ cli_errstr(cli)));
return(False);
}
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index 6b099dbc0bc..07de579e017 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -602,7 +602,7 @@ smb_print(struct cli_state * cli, /* I - SMB connection */
tbytes += nbytes;
}
- if (!cli_close(cli, fnum)) {
+ if (!NT_STATUS_IS_OK(cli_close(cli, fnum))) {
fprintf(stderr, "ERROR: %s closing remote spool %s\n",
cli_errstr(cli), title);
return (get_exit_code(cli, cli_nt_error(cli)));