🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.testers
Article #46

Linux Modem Server 2.09beta2 patch

#46
From: Anthony Rumble
Date: Wed, 17 Nov 1993 00:17
129 lines
4598 bytes
Anthony Rumble (smilie@lsupoz.apana.org.au) wrote:
: Linux Modem SERVER version 2.09beta1

Oooops.. I made a dreadfull mistake.. 57600 was 56700..

anyway.. heres a patch to fix it..
if you want the full file it's available under
yarrina.connect.com.au:/tmp/mdm/mdm-2.06-beta2.tar.gz

*** ../modem.old/modem.c	Tue Nov 16 22:55:12 1993
--- modem.c	Wed Nov 17 10:54:41 1993
*************** eg:
*** 176,181 ****
--- 176,183 ----
  /* Macros */
  
  #define LOG_TTY flog("%u VMIN = %u, VTIME = %u, ICANON = %u, ISIG = %u\n", __LINE__,ti.c_cc[VMIN], ti.c_cc[VTIME], ((ti.c_lflag&ICANON) ? 1 : 0), ((ti.c_lflag&ISIG) ? 1 : 0))
+ #define LOG_FLAGS flog("i%u o%u c%u l%u\n", ti.c_iflag, ti.c_oflag, ti.c_cflag, ti.c_lflag);
+ #define LOG_SPEED flog("ospeed = %u ispeed = %u\n", cfgetospeed(&ti), cfgetispeed(&ti));
  
  /* File scope variables */
  
*************** long setgetbaud(long s)
*** 205,210 ****
--- 207,215 ----
  {
  long baudrate = 0;
  struct termios tt;
+ #ifdef DEBUG
+ struct termios ti;
+ #endif
  #ifdef linux
  static struct serial_struct ser_io;
  #endif
*************** if (s != 0) 		/* If setting baudrate... 
*** 254,260 ****
  			#endif
  		break;
  		#ifdef linux
! 		case 56700:
  			baudrate = B38400;
  			ser_io.flags &= ~ASYNC_SPD_MASK;
  			ser_io.flags |= ASYNC_SPD_HI;
--- 259,265 ----
  			#endif
  		break;
  		#ifdef linux
! 		case 57600:
  			baudrate = B38400;
  			ser_io.flags &= ~ASYNC_SPD_MASK;
  			ser_io.flags |= ASYNC_SPD_HI;
*************** if (s != 0) 		/* If setting baudrate... 
*** 266,271 ****
--- 271,277 ----
  		break;
  		#endif
  		default:
+ 			flog("ERROR: Bad Speed %u\n", s);
  			return (-1);
  		}
  
*************** if (s != 0) 		/* If setting baudrate... 
*** 274,279 ****
--- 280,290 ----
  
  	tcsetattr(0, TCSADRAIN, &tt);	/* Set the speed and others */
  
+ 	#ifdef DEBUG
+ 	tcgetattr(0, &ti);
+ 	LOG_SPEED;
+ 	#endif /* DEBUG */
+ 
  	#ifdef linux
  	if (baudrate == B38400)
  		if (ioctl(0, TIOCSSERIAL, &ser_io) < 0)		/* set special speed */
*************** if (s != 0) 		/* If setting baudrate... 
*** 281,286 ****
--- 292,302 ----
  			flog("ERROR: Could not set linux serial info (Old Kernel?)");
  			return -1;
  			}
+ 	#ifdef DEBUG
+ 	tcgetattr(0, &ti);
+ 	LOG_SPEED;
+ 	#endif /* DEBUG */
+ 
  	#endif /*linux*/
  	return s;
  	}
*************** else
*** 315,321 ****
  			return 115200;
  		else 
  			if ((ser_io.flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
! 				return 56700;
  			else
  			#endif /*linux*/
  				return 38400;
--- 331,337 ----
  			return 115200;
  		else 
  			if ((ser_io.flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
! 				return 57600;
  			else
  			#endif /*linux*/
  				return 38400;
*************** dup2(0, 2);
*** 985,991 ****
  #ifdef DEBUG
  tcgetattr(0, &ti);
  LOG_TTY;
! flog("i%u o%u c%u l%u\n", ti.c_iflag, ti.c_oflag, ti.c_cflag, ti.c_lflag);
  #endif
  
  /* Execute login */
--- 1001,1008 ----
  #ifdef DEBUG
  tcgetattr(0, &ti);
  LOG_TTY;
! LOG_FLAGS;
! LOG_SPEED;
  #endif
  
  /* Execute login */

-- 
root@lsupoz.apana.org.au   APANA Sydney UUCP regional hub (feeds available)
Anthony Rumble             Linux Support OZ (02) 418-8750 v.32bis - 3 lines
Voice (02) 418-8220	   For information on APANA mail info@apana.org.au
Technical Details
Message-ID: <2cbqim$n6d@lsupoz.apana.org.au>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!spool.mu.edu!caen!batcomputer!munnari.oz.au!yarrina.connect.com.au!werple.apana.org.au!lsupoz.apana.org.au!not-for-mail
References: <2cblem$lb4@lsupoz.apana.org.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113dbc,ee1c4e56442121b7
X-Google-Attributes: gid113dbc,public
X-Google-Thread: 10c7cf,ee1c4e56442121b7
X-Google-Attributes: gid10c7cf,public
X-Google-Thread: 111247,ee1c4e56442121b7
X-Google-Attributes: gid111247,public
X-Google-Thread: 14ddb6,ee1c4e56442121b7
X-Google-Attributes: gid14ddb6,public
X-Google-Thread: f4838,ee1c4e56442121b7
X-Google-Attributes: gidf4838,public
X-Google-ArrivalTime: 1993-11-16 22:43:51 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!spool.mu.edu!caen!batcomputer!munnari.oz.au!yarrina.connect.com.au!werple.apana.org.au!lsupoz.apana.org.au!not-for-mail
From: smilie@lsupoz.apana.org.au (Anthony Rumble)
Newsgroups: comp.sources.testers,comp.os.linux.development,apana.general,lsupoz.general,apana.linux
Subject: Linux Modem Server 2.09beta2 patch
Followup-To: comp.sources.testers,comp.os.linux.development,apana.general,lsupoz.general,apana.linux
Date: 17 Nov 1993 11:17:26 +1100
Organization: Linux Support OZ +61-2-418-8750
Lines: 129
Message-ID: <2cbqim$n6d@lsupoz.apana.org.au>
References: <2cblem$lb4@lsupoz.apana.org.au>
NNTP-Posting-Host: localhost.apana.org.au
X-Newsreader: TIN [version 1.2 PL2]