From: djk Date: Tue, 28 Mar 2000 22:08:06 +0000 (+0000) Subject: make MAXPACLEN the default buffer length on non ax25 connections X-Git-Tag: R_1_39a~2 X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b4e7cb0bc2d11b44d496e139bab5948625641957;hp=f686f4454acf8431eca458918c7caeb385a9c9e3;p=spider.git make MAXPACLEN the default buffer length on non ax25 connections --- diff --git a/src/client.c b/src/client.c index b50514fa..e22d84ac 100644 --- a/src/client.c +++ b/src/client.c @@ -44,7 +44,9 @@ #define MAXPATHLEN 256 #endif +#define DEFPACLEN 128 #define MAXPACLEN 236 + #define DBUF 1 #define DMSG 2 @@ -84,7 +86,7 @@ char echo = 1; /* echo characters on stdout from stdin */ char int_tabs = 0; /* interpret tabs -> spaces */ char *root = "/spider"; /* root of data tree, can be overridden by DXSPIDER_ROOT */ int timeout = 60; /* default timeout for logins and things */ -int paclen = 128; /* default buffer size for outgoing packets */ +int paclen = DEFPACLEN; /* default buffer size for outgoing packets */ int tabsize = 8; /* default tabsize for text messages */ myregex_t iscallreg[] = { /* regexes to determine whether this is a reasonable callsign */ @@ -488,6 +490,11 @@ lerr: nl = '\n'; echo = 1; } + + /* this is kludgy, but hey so is the rest of this! */ + if (!eq(connsort, "ax25") && paclen == DEFPACLEN) { + paclen = MAXPACLEN; + } } void connect_to_node()