svn commit: samba r23989 - in branches: SAMBA_3_2/source/client SAMBA_3_2_0/source/client

vlendec at samba.org vlendec at samba.org
Sun Jul 22 11:18:49 GMT 2007


Author: vlendec
Date: 2007-07-22 11:18:49 +0000 (Sun, 22 Jul 2007)
New Revision: 23989

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23989

Log:
For testing purposes, add "echo" to smbclient

Modified:
   branches/SAMBA_3_2/source/client/client.c
   branches/SAMBA_3_2_0/source/client/client.c


Changeset:
Modified: branches/SAMBA_3_2/source/client/client.c
===================================================================
--- branches/SAMBA_3_2/source/client/client.c	2007-07-21 22:29:55 UTC (rev 23988)
+++ branches/SAMBA_3_2/source/client/client.c	2007-07-22 11:18:49 UTC (rev 23989)
@@ -775,6 +775,24 @@
 	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 @@
   {"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}},

Modified: branches/SAMBA_3_2_0/source/client/client.c
===================================================================
--- branches/SAMBA_3_2_0/source/client/client.c	2007-07-21 22:29:55 UTC (rev 23988)
+++ branches/SAMBA_3_2_0/source/client/client.c	2007-07-22 11:18:49 UTC (rev 23989)
@@ -775,6 +775,24 @@
 	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
 ****************************************************************************/
@@ -3219,6 +3237,7 @@
   {"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}},



More information about the samba-cvs mailing list