diff options
Diffstat (limited to 'source3/client')
-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 18b286324b..1c0dff92c1 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))); } } |