summaryrefslogtreecommitdiffstats
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
authorrik <rik@FreeBSD.org>2004-05-25 21:54:07 +0000
committerrik <rik@FreeBSD.org>2004-05-25 21:54:07 +0000
commit210c22329d09833e3de63df0963e180c00fb7f39 (patch)
treecefb58670188cf1258ffce45e56f44f08e9e9584 /sys/net/if_spppsubr.c
parent4225bf90f05e2498f31f036ff5f26334557090d6 (diff)
downloadFreeBSD-src-210c22329d09833e3de63df0963e180c00fb7f39.zip
FreeBSD-src-210c22329d09833e3de63df0963e180c00fb7f39.tar.gz
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.
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c4
1 files changed, 2 insertions, 2 deletions
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++)
OpenPOWER on IntegriCloud