summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2007-12-23 16:42:45 +0000
committerhenning <henning@openbsd.org>2007-12-23 16:42:45 +0000
commit18fbad5bd2802238854c1c50ea47d65567b52bd2 (patch)
tree70da449ccdc94f0ef12091319c12d9548a29b66a
parentmake all timer_get() callers (except timer_set which will need (diff)
downloadwireguard-openbsd-18fbad5bd2802238854c1c50ea47d65567b52bd2.tar.xz
wireguard-openbsd-18fbad5bd2802238854c1c50ea47d65567b52bd2.zip
use timer_running (with left = NULL, which the last commit made possible)
instead of timer_get and checking manually
-rw-r--r--usr.sbin/bgpd/session.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index c80a1b0f4a5..f2d10f2046c 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.277 2007/12/20 17:08:48 henning Exp $ */
+/* $OpenBSD: session.c,v 1.278 2007/12/23 16:42:45 henning Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -992,8 +992,7 @@ session_accept(int listenfd)
p = getpeerbyip((struct sockaddr *)&cliaddr);
if (p != NULL && p->state == STATE_IDLE && p->errcnt < 2) {
- time_t *t = timer_get(p, Timer_IdleHold);
- if (*t > 0) {
+ if (timer_running(p, Timer_IdleHold, NULL)) {
/* fast reconnect after clear */
p->passive = 1;
bgp_fsm(p, EVNT_START);