diff options
Diffstat (limited to 'usr.sbin/ospfd/database.c')
-rw-r--r-- | usr.sbin/ospfd/database.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/usr.sbin/ospfd/database.c b/usr.sbin/ospfd/database.c index 24fed999a7b..0610c84da58 100644 --- a/usr.sbin/ospfd/database.c +++ b/usr.sbin/ospfd/database.c @@ -1,4 +1,4 @@ -/* $OpenBSD: database.c,v 1.18 2006/03/09 13:34:19 claudio Exp $ */ +/* $OpenBSD: database.c,v 1.19 2006/03/13 09:36:06 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -393,28 +393,30 @@ db_tx_timer(int fd, short event, void *arg) if (nbr->master) { timerclear(&tv); tv.tv_sec = nbr->iface->rxmt_interval; - evtimer_add(&nbr->db_tx_timer, &tv); + if (evtimer_add(&nbr->db_tx_timer, &tv) == -1) + fatal("db_tx_timer"); } } -int +void start_db_tx_timer(struct nbr *nbr) { struct timeval tv; if (nbr == nbr->iface->self) - return (0); + return; timerclear(&tv); - - return (evtimer_add(&nbr->db_tx_timer, &tv)); + if (evtimer_add(&nbr->db_tx_timer, &tv) == -1) + fatal("start_db_tx_timer"); } -int +void stop_db_tx_timer(struct nbr *nbr) { if (nbr == nbr->iface->self) - return (0); + return; - return (evtimer_del(&nbr->db_tx_timer)); + if (evtimer_del(&nbr->db_tx_timer) == -1) + fatal("stop_db_tx_timer"); } |