diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-07-22 11:18:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:28:52 -0500 |
commit | 9e78a3cb3854863a51e75e0f47b65e8fe80a7987 (patch) | |
tree | 91421280d02d7870f9183413788bf3361d6f4d7c /source3 | |
parent | 941db29ab41a893ca2f4f2fb39f31cfbb6a634c9 (diff) | |
download | samba-9e78a3cb3854863a51e75e0f47b65e8fe80a7987.tar.gz samba-9e78a3cb3854863a51e75e0f47b65e8fe80a7987.tar.bz2 samba-9e78a3cb3854863a51e75e0f47b65e8fe80a7987.zip |
r23989: For testing purposes, add "echo" to smbclient
(This used to be commit 4cdfc887545f7367239c73b0fecf173970bbc5d2)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/client/client.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 6a1c453c2c..f2a5f8593f 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -775,6 +775,24 @@ static int cmd_du(void) return rc; } +static int cmd_echo(void) +{ + pstring data; + + if (!next_token_nr(NULL, data, NULL, sizeof(data))) { + d_printf("echo <data>\n"); + return 1; + } + + if (!cli_echo(cli, (uint8 *)data, strlen(data))) { + d_printf("echo failed: %s\n", + nt_errstr(cli_get_nt_error(cli))); + return 1; + } + + return 0; +} + /**************************************************************************** Get a file from rname to lname ****************************************************************************/ @@ -3267,6 +3285,7 @@ static struct {"del",cmd_del,"<mask> delete all matching files",{COMPL_REMOTE,COMPL_NONE}}, {"dir",cmd_dir,"<mask> list the contents of the current directory",{COMPL_REMOTE,COMPL_NONE}}, {"du",cmd_du,"<mask> computes the total size of the current directory",{COMPL_REMOTE,COMPL_NONE}}, + {"echo",cmd_echo,"ping the server",{COMPL_NONE,COMPL_NONE}}, {"exit",cmd_quit,"logoff the server",{COMPL_NONE,COMPL_NONE}}, {"get",cmd_get,"<remote name> [local name] get a file",{COMPL_REMOTE,COMPL_LOCAL}}, {"getfacl",cmd_getfacl,"<file name> get the POSIX ACL on a file (UNIX extensions only)",{COMPL_REMOTE,COMPL_LOCAL}}, |