diff --git a/BETA.README b/BETA.README index 5b533c6..67f9b82 100644 --- a/BETA.README +++ b/BETA.README @@ -22,7 +22,6 @@ Code fixups: - fspd: add special defence against rapid/double fire clients (burst command in fspclient) * for next point Stable version 2.8.3 -- retune alg. for links with high packet loss - hard coded access list, do not load it from filesystem - support for ~user namespace diff --git a/ChangeLog b/ChangeLog index ebb4cb2..2295654 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,10 @@ Version NEXT FAQ: added section about key locking, dmachine, FSP stack libraries, lamah FSP Win32 suite. print packet stats after up/downloads if client tracing is enabled. + fbye: lower timeout to 10 sec on CC_BYE + FAQ: Added two section making FSP slower/faster, version bumped + to 0.2 + do not use exit code -1 in fspscan Version 2.8.1b22 - 20 Dec 2004 fixed sf bug 1060594: fspd: owner can't rename files diff --git a/TODO b/TODO index bc30322..bf30087 100644 --- a/TODO +++ b/TODO @@ -15,7 +15,7 @@ Test if >2GB files but <4GB works correctly with and without --disable-largefile SECURITY BUGS: symlink to FILE can escape from FSP root directory. OLD known problem. -symlink support must be reworked before final release. +symlink support must be reworked before `final` release. PROTOCOL-RELATED BUGS: we should add real,portable error codes support to CC_ERR extended data area. @@ -101,7 +101,7 @@ FSP plugin for Netscape/MSIE. we have fsproxy now. FSP backend for APT Experimental transfer HTTP over fsp transport -FSP support in major ftp programs: lftp,wget,curl,gftp +FSP support in major ftp programs: lftp,wget,curl AVFS plugin http://sourceforge.net/projects/avf LARGEFILES64 how to turn them on: diff --git a/client/lib.c b/client/lib.c index 06e5539..4528b4f 100644 --- a/client/lib.c +++ b/client/lib.c @@ -255,6 +255,7 @@ void init_client (const char * host, unsigned short port, unsigned short myport) void client_finish(void) { + env_timeout=10; (void) client_interact(CC_BYE, 0L, 0, (unsigned char *)NULLP, 0, (unsigned char *)NULLP); client_destroy_key(); diff --git a/clients/fbye.c b/clients/fbye.c index 293b88b..09f4fe6 100644 --- a/clients/fbye.c +++ b/clients/fbye.c @@ -23,4 +23,5 @@ int main (int argc, char ** argv) { env_client(); client_finish(); + return 0; } diff --git a/clients/ffindcmd.c b/clients/ffindcmd.c index 8609dd1..914540e 100644 --- a/clients/ffindcmd.c +++ b/clients/ffindcmd.c @@ -120,5 +120,5 @@ int main (int argc, char ** argv) static void usage_ffind (void) { fprintf(stderr,"usage: ffind file [file ...] expression\n"); - exit(1); + exit(EX_USAGE); } diff --git a/configure.ac b/configure.ac index 83ba389..54528b4 100644 --- a/configure.ac +++ b/configure.ac @@ -183,7 +183,7 @@ AC_CHECK_MEMBER(struct dirent.d_fileno,AC_DEFINE(HAVE_D_FILENO,1,[define if you ,[#include ]) AC_HEADER_SYS_WAIT AC_HEADER_STAT -AC_CHECK_HEADER(tzfile.h) +AC_CHECK_HEADERS(tzfile.h sysexits.h) AC_CACHE_CHECK(for string.h declaring some functions incorrectly,fsp_cv_header_string_bogus,[ AC_TRY_LINK([#include #include ],, diff --git a/contrib/fspscan.c b/contrib/fspscan.c index d56e0e5..39e5164 100644 --- a/contrib/fspscan.c +++ b/contrib/fspscan.c @@ -127,7 +127,7 @@ int main(int argc,char **argv) if (host == NULL) { fprintf(stderr, "host/ip not specified, unable to continue\n"); printhelp(argc, argv); - exit(-1); + exit(1); } if (outputfile == NULL) { diff --git a/doc/fsp-faq.sgml b/doc/fsp-faq.sgml index 124b76b..bf4396d 100644 --- a/doc/fsp-faq.sgml +++ b/doc/fsp-faq.sgml @@ -27,8 +27,8 @@ - 0.1 - 2004.12.17 + 0.2 + 2005.01.03 @@ -658,7 +658,7 @@ ftp dgram udp wait ftp /usr/local/bin/fspd in.fspd -d /home/ftp There are several methods how to do this key sharing. Best method is to use semop+shmget, second is to use lockf on file in /tmp. All FSP clients running on the same machine must use the same locking method. - + Why not use bigger packet size? &fsp; defines maximum packet size 1024 bytes of data + header. @@ -691,6 +691,18 @@ ftp dgram udp wait ftp /usr/local/bin/fspd in.fspd -d /home/ftp Second library is called FSPlib. This is FSP library for C language with POSIX-like API. FSP support for Python PyFSP is currently work in progress. Note: PyFSP uses GPL license, not MIT/X11 like other libraries. + + How can I make FSP faster? + + Set FSP server and client to use bigger block size (), decrease server retry timeout to 1 sec, and descrease client delay also. Using this methods, FSP can run about 1.7 faster than before. + If you need even higher transfer speed, switch to HTTP protocol. + + How can I make FSP slower? + + If your FSP server eats too much bandwidth, the best is to use + smaller packets. FSP server has builtin output thruput limiting, you + can slow down it in fspd.conf file. Slightly increasing server retry + timer also helps. diff --git a/include/tweak.h b/include/tweak.h index 4b4b9ad..78fe9ee 100644 --- a/include/tweak.h +++ b/include/tweak.h @@ -46,6 +46,10 @@ #endif #endif +#ifdef HAVE_SYSEXITS_H +#include +#endif + #if !defined(BYTE) #if SIZEOF_CHAR == 1 #define BYTE char diff --git a/man/fspscan.1 b/man/fspscan.1 index f3360c1..676cb06 100644 --- a/man/fspscan.1 +++ b/man/fspscan.1 @@ -1,4 +1,4 @@ -.TH FSPSCAN 1 "Oct 2004" FSP +.TH FSPSCAN 1 "Jan 2005" FSP .SH NAME fspscan is a small tool to scan host for a running fsp server @@ -46,7 +46,8 @@ This program was written in late 1992 by Cuda and quickly becomes must have tool for every FSP fan. In September 2003 it was adapted to modern C compilers and added to FSP suite by Radim Kolar. Because most value of this program is purely historic, fixes -to this program are kept at minimal amount. +and feature enhancements +of this program are kept at minimal amount. .SH "SEE ALSO" .PD fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), diff --git a/server/conf.c b/server/conf.c index 8eb4fc0..8432776 100644 --- a/server/conf.c +++ b/server/conf.c @@ -186,14 +186,6 @@ static void read_configuration (const char * name) } else if(strcasecmp(p, "packetsize") == 0) { packetsize = atoi(q); - if(packetsize == 0) - packetsize = DEFAULT_SPACE; - else - if(packetsize < 64 ) - packetsize = 64; - else - if(packetsize > UBUF_MAXSPACE ) - packetsize = UBUF_MAXSPACE; } else if(strcasecmp(p, "filecache") == 0) { fp_cache_limit = atoi(q); @@ -213,7 +205,7 @@ static void read_configuration (const char * name) } else if(strcasecmp(p, "timeout") == 0) { session_timeout = atoi(q); - if(session_timeout <= 5 ) session_timeout = 60; + if(session_timeout < 7 ) session_timeout = 60; } else if(strcasecmp(p, "statcache_timeout") == 0) { session_timeout = atoi(q); diff --git a/server/main.c b/server/main.c index f4f4731..3bea463 100644 --- a/server/main.c +++ b/server/main.c @@ -234,11 +234,11 @@ int main (int argc, char ** argv) fprintf(stderr,"listening on port %d\n",udp_port); fprintf(stderr,"FSP payload size %d bytes\n",packetsize); } -#ifdef LAMERPACK +#ifdef LAMERPACK display_version(); fprintf(stderr,"rocking on port %d\n",udp_port); fprintf(stderr,"FSP payload size %d bytes\n",packetsize); -#endif +#endif } /* Moved setuid to here from below because log file was getting opened