diff options
Diffstat (limited to 'source3/client/client.c')
-rw-r--r-- | source3/client/client.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index ce66e08930..91cf128bc4 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -777,14 +777,16 @@ static int cmd_du(void) static int cmd_echo(void) { + fstring num; pstring data; - if (!next_token_nr(NULL, data, NULL, sizeof(data))) { - d_printf("echo <data>\n"); + if (!next_token_nr(NULL, num, NULL, sizeof(num)) + || !next_token_nr(NULL, data, NULL, sizeof(data))) { + d_printf("echo <num> <data>\n"); return 1; } - if (!cli_echo(cli, (uint8 *)data, strlen(data))) { + if (!cli_echo(cli, atoi(num), (uint8 *)data, strlen(data))) { d_printf("echo failed: %s\n", nt_errstr(cli_get_nt_error(cli))); return 1; @@ -3730,7 +3732,7 @@ static void readline_callback(void) { unsigned char garbage[16]; memset(garbage, 0xf0, sizeof(garbage)); - cli_echo(cli, garbage, sizeof(garbage)); + cli_echo(cli, 1, garbage, sizeof(garbage)); } } |