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.
This commit is contained in:
rik 2004-05-25 21:54:07 +00:00
parent 4225bf90f0
commit 210c22329d

View File

@ -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++)