git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fd7af1
)
Merge:
author
Tim Potter
<tpot@samba.org>
Mon, 28 Apr 2003 05:54:37 +0000
(
05:54
+0000)
committer
Tim Potter
<tpot@samba.org>
Mon, 28 Apr 2003 05:54:37 +0000
(
05:54
+0000)
>Patch from waider to set exit code of last executed command specified
>as an argument to -c.
source/rpcclient/rpcclient.c
patch
|
blob
|
history
diff --git
a/source/rpcclient/rpcclient.c
b/source/rpcclient/rpcclient.c
index bf016e94c7c69cfe0db33d56e4ba148241f88a0e..0411212e8c8a7ebdad2d6bf4cb6fb477277b675d 100644
(file)
--- a/
source/rpcclient/rpcclient.c
+++ b/
source/rpcclient/rpcclient.c
@@
-628,13
+628,15
@@
out_free:
if (cmdstr && cmdstr[0]) {
char *cmd;
char *p = cmdstr;
+ int result = 0;
while((cmd=next_command(&p)) != NULL) {
- process_cmd(cli, cmd);
+ NTSTATUS cmd_result = process_cmd(cli, cmd);
+ result = NT_STATUS_IS_ERR(cmd_result);
}
cli_shutdown(cli);
- return
0
;
+ return
result
;
}
/* Loop around accepting commands */