From 228a12681bc7e6eb5bddb75b3b97a74c5eef1c3a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 27 Aug 2008 19:30:57 +0200 Subject: Add async smbecho client support (This used to be commit c1d645fbe39433541d8bfe6b818c855cee318dc5) --- 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 18b286324b6..1c0dff92c15 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -943,6 +943,7 @@ static int cmd_echo(void) TALLOC_CTX *ctx = talloc_tos(); char *num; char *data; + NTSTATUS status; if (!next_token_talloc(ctx, &cmd_ptr, &num, NULL) || !next_token_talloc(ctx, &cmd_ptr, &data, NULL)) { @@ -950,9 +951,10 @@ static int cmd_echo(void) return 1; } - if (!cli_echo(cli, atoi(num), (uint8 *)data, strlen(data))) { - d_printf("echo failed: %s\n", - nt_errstr(cli_get_nt_error(cli))); + status = cli_echo(cli, atoi(num), data_blob_const(data, strlen(data))); + + if (!NT_STATUS_IS_OK(status)) { + d_printf("echo failed: %s\n", nt_errstr(status)); return 1; } @@ -4417,7 +4419,7 @@ static void readline_callback(void) { unsigned char garbage[16]; memset(garbage, 0xf0, sizeof(garbage)); - cli_echo(cli, 1, garbage, sizeof(garbage)); + cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage))); } } -- cgit