From 329365684bca99bf9020b6638a1357df65c1d938 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 2 Nov 2007 12:21:34 -0700 Subject: Change the client library to write directly out of the incoming buffer in the non-signed case. Speeds up writes by over 10% or so. Complete the server recvfile implementation. Jeremy. (This used to be commit 81ca5853b2475f123faab3b550f0a7b24ae3c208) --- source3/client/client.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source3/client/client.c') diff --git a/source3/client/client.c b/source3/client/client.c index a381d13cae..27f120ce9a 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -3227,6 +3227,35 @@ static int cmd_show_connect( void ) return 0; } +/**************************************************************************** + iosize command +***************************************************************************/ + +int cmd_iosize(void) +{ + fstring buf; + int iosize; + + if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) { + DEBUG(0, ("iosize or iosize 0x. " + "Minimum is 16384 (0x4000), " + "max is 16776960 (0xFFFF00)\n")); + return 1; + } + + iosize = strtol(buf,NULL,0); + if (iosize < 0 || iosize > 0xFFFF00) { + DEBUG(0, ("iosize out of range (min = 16384 (0x4000), " + "max = 16776960 (0x0xFFFF00)")); + return 1; + } + + io_bufsize = iosize; + d_printf("iosize is now %d\n", io_bufsize); + return 0; +} + + /* Some constants for completing filename arguments */ #define COMPL_NONE 0 /* No completions */ @@ -3265,6 +3294,7 @@ static struct {"hardlink",cmd_hardlink," create a Windows hard link",{COMPL_REMOTE,COMPL_REMOTE}}, {"help",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}}, {"history",cmd_history,"displays the command history",{COMPL_NONE,COMPL_NONE}}, + {"iosize",cmd_iosize,"iosize (default 64512)",{COMPL_NONE,COMPL_NONE}}, {"lcd",cmd_lcd,"[directory] change/report the local current working directory",{COMPL_LOCAL,COMPL_NONE}}, {"link",cmd_link," create a UNIX hard link",{COMPL_REMOTE,COMPL_REMOTE}}, {"lock",cmd_lock,"lock [r|w] : set a POSIX lock",{COMPL_REMOTE,COMPL_REMOTE}}, -- cgit