repo sync

This commit is contained in:
hsn 2005-07-23 20:05:10 +00:00
parent 79a86f2266
commit 9e88e6c548
3 changed files with 22 additions and 6 deletions

View File

@ -10,6 +10,10 @@ Version NEXT
fspd.conf: added more information about packetsize
fspd.1: updated information about packetsize
fspd.conf: repaired some spelling errors by ispell
MTU changed from 1500 to 1492 for better operation on pppOE networks
Max payload changed from 4096 to 4380 bytes (3 packets)
fspd: command line argument now overrides config file
updated year in copyright
Version 2.8.1b24 - 19 Feb 2005
use getopt from stdio.h instead of getopt.h in fspscan.c

View File

@ -53,8 +53,8 @@
#define UBUF_HSIZE 12 /* 12 bytes for the header */
#define UBUF_SPACE 1024 /* maximum standard payload. */
#define UBUF_MAXSPACE 4096 /* maximum payload supported by server */
#define DEFAULT_SPACE 1500-20-8-12 /* Max packet size for standard 1500 mtu ethernet */
#define UBUF_MAXSPACE 4380 /* maximum payload supported by server */
#define DEFAULT_SPACE 1492-20-8-12 /* Max packet size for standard 1500 mtu ethernet */
#define NBSIZE (UBUF_MAXSPACE+UBUF_SPACE)

View File

@ -25,7 +25,7 @@ static void display_version (void)
printf(
#ifndef LAMERPACK
"File Service Protocol Daemon - FSP "PACKAGE_VERSION"\n"
"Copyright (c) 1991-1996 by A. J. Doherty, 2001-2004 by Radim Kolar.\n"
"Copyright (c) 1991-1996 by A. J. Doherty, 2001-2005 by Radim Kolar.\n"
"All of the FSP code is free software with revised BSD license.\n"
"Portions copyright by BSD, Wen-King Su, Philip G. Richards, Michael Meskes.\n"
#ifdef __GNUC__
@ -156,6 +156,20 @@ int main (int argc, char ** argv)
if(strlen(argv[0])>=7)
inetd_mode = !strcasecmp(&argv[0][strlen(argv[0])-7],"in.fspd");
/* we need to check if we have config file at command line */
for(opt=1;opt<argc-1;opt++)
{
printf("arg %d = %s\n",opt,argv[opt]);
if(!strcmp(argv[opt],"-f"))
{
load_configuration(argv[opt+1]);
config_file=NULL;
}
}
load_configuration(config_file);
while( (opt=getopt(argc,argv,
#ifndef LAMERPACK
"h?Xd:f:vVip:t:FT:l:P:b:s:"
@ -170,8 +184,7 @@ int main (int argc, char ** argv)
dbug = 1;
break;
case 'f':
load_configuration(optarg);
config_file = NULL;
/* already loaded */
break;
case 'd':
if(home_dir) free(home_dir);
@ -223,7 +236,6 @@ int main (int argc, char ** argv)
}
}
load_configuration(config_file);
init_random();
check_required_vars();