summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpcclient/rpcclient.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index bf016e94c7..0411212e8c 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/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 */