o Remove some unused #includes.

o Make sure our ipcp throughput timer is stopped before being nuked
  with a memset.
o Don't initialise struct async & struct hdlc twice in modem_Create().
o Clarify some comments.
This commit is contained in:
Brian Somers 1998-04-21 01:02:32 +00:00
parent a7a615faaa
commit fdf6117177
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=35361
4 changed files with 11 additions and 14 deletions

View File

@ -17,12 +17,11 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: async.c,v 1.15.2.11 1998/04/07 00:53:17 brian Exp $
* $Id: async.c,v 1.15.2.12 1998/04/19 01:18:51 brian Exp $
*
*/
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <termios.h>

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ipcp.c,v 1.50.2.39 1998/04/19 03:40:59 brian Exp $
* $Id: ipcp.c,v 1.50.2.40 1998/04/19 23:08:24 brian Exp $
*
* TODO:
* o More RFC1772 backwoard compatibility
@ -34,7 +34,6 @@
#include <fcntl.h>
#include <resolv.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/errno.h>
@ -373,6 +372,7 @@ ipcp_Init(struct ipcp *ipcp, struct bundle *bundle, struct link *l,
ipcp->my_ifip.s_addr = INADDR_ANY;
ipcp->peer_ifip.s_addr = INADDR_ANY;
throughput_init(&ipcp->throughput);
ipcp_Setup(ipcp);
}
@ -431,6 +431,7 @@ ipcp_Setup(struct ipcp *ipcp)
ipcp->peer_reject = 0;
ipcp->my_reject = 0;
throughput_stop(&ipcp->throughput);
throughput_init(&ipcp->throughput);
}

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: modem.c,v 1.77.2.53 1998/04/19 23:08:46 brian Exp $
* $Id: modem.c,v 1.77.2.54 1998/04/20 00:20:37 brian Exp $
*
* TODO:
*/
@ -132,9 +132,6 @@ modem_Create(struct datalink *dl, int type)
strncpy(p->cfg.devlist, MODEM_LIST, sizeof p->cfg.devlist - 1);
p->cfg.devlist[sizeof p->cfg.devlist - 1] = '\0';
hdlc_Init(&p->hdlc);
async_Init(&p->async);
lcp_Init(&p->link.lcp, dl->bundle, &p->link, &dl->fsmp);
ccp_Init(&p->link.ccp, dl->bundle, &p->link, &dl->fsmp);

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: timer.c,v 1.27.2.6 1998/04/18 23:17:26 brian Exp $
* $Id: timer.c,v 1.27.2.7 1998/04/19 23:09:03 brian Exp $
*
* TODO:
*/
@ -69,9 +69,9 @@ StartTimer(struct pppTimer * tp)
omask = sigblock(sigmask(SIGALRM));
if (tp->state != TIMER_STOPPED) {
if (tp->state != TIMER_STOPPED)
StopTimerNoBlock(tp);
}
if (tp->load == 0) {
LogPrintf(LogDEBUG, "%s timer[%p] has 0 load!\n", tp->name, tp);
sigsetmask(omask);
@ -114,9 +114,9 @@ StopTimerNoBlock(struct pppTimer * tp)
struct pppTimer *t, *pt;
/*
* A Running Timer should be removing TimerList, But STOPPED/EXPIRED is
* already removing TimerList. So just marked as TIMER_STOPPED. Do not
* change tp->enext!! (Might be Called by expired proc)
* A RUNNING timer must be removed from TimerList (->next list).
* A STOPPED timer isn't in any list, but may have a bogus [e]next field.
* An EXPIRED timer is in the ->enext list.
*/
if (tp->state != TIMER_RUNNING) {
tp->next = NULL;