summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-08-27 19:30:57 +0200
committerVolker Lendecke <vl@samba.org>2008-08-28 18:16:00 +0200
commit228a12681bc7e6eb5bddb75b3b97a74c5eef1c3a (patch)
tree43fa6443cbbaabefbc88b9e574d0da0994988860 /source3/client/client.c
parentbb0fc9cfceab7e961eaa9049d111121609ff8174 (diff)
downloadsamba-228a12681bc7e6eb5bddb75b3b97a74c5eef1c3a.tar.gz
samba-228a12681bc7e6eb5bddb75b3b97a74c5eef1c3a.tar.bz2
samba-228a12681bc7e6eb5bddb75b3b97a74c5eef1c3a.zip
Add async smbecho client support
(This used to be commit c1d645fbe39433541d8bfe6b818c855cee318dc5)
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c10
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)));
}
}