From c847b2afe7f4c979499c20869563439e25f0cb7e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 4 Aug 2007 20:08:35 +0000 Subject: r24223: Convert reply_echo to the new API (This used to be commit 4863ff2899419e791ed0e340821072d004fb1d17) --- source3/client/client.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/client') 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 \n"); + if (!next_token_nr(NULL, num, NULL, sizeof(num)) + || !next_token_nr(NULL, data, NULL, sizeof(data))) { + d_printf("echo \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)); } } -- cgit