summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/rpcclient.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index d50510212e..787545173b 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -647,7 +647,6 @@ static void usage(char *pname)
add_command_set(samr_commands);
add_command_set(separator_command);
-
/* Do anything specified with -c */
if (cmdstr[0]) {
char *cmd;
@@ -660,7 +659,6 @@ static void usage(char *pname)
return 0;
}
-
/* Loop around accepting commands */
while(1) {
pstring prompt;
@@ -670,7 +668,12 @@ static void usage(char *pname)
line = smb_readline(prompt, NULL, completion_fn);
- process_cmd(&cli, line);
+ if (line == NULL)
+ break;
+
+ if (line[0] != '\n')
+ process_cmd(&cli, line);
}
-}
+ return 0;
+}