From 210c22329d09833e3de63df0963e180c00fb7f39 Mon Sep 17 00:00:00 2001 From: rik Date: Tue, 25 May 2004 21:54:07 +0000 Subject: Keepalive timer should be added if we does not have any sppp consumers before and should be deleted if we do not have any anymore. --- sys/net/if_spppsubr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/net/if_spppsubr.c') diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 776bbdd..83fb1fc 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -961,7 +961,7 @@ sppp_attach(struct ifnet *ifp) struct sppp *sp = (struct sppp*) ifp; /* Initialize keepalive handler. */ - if (spppq != NULL) + if (spppq == NULL) TIMEOUT(sppp_keepalive, 0, hz * 10, keepalive_ch); /* Insert new entry into the keepalive list. */ @@ -1020,7 +1020,7 @@ sppp_detach(struct ifnet *ifp) } /* Stop keepalive handler. */ - if (spppq != NULL) + if (spppq == NULL) UNTIMEOUT(sppp_keepalive, 0, keepalive_ch); for (i = 0; i < IDX_COUNT; i++) -- cgit v1.1