From beeda6af44e72e3a20fcd2837b231a04354790fa Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 7 Jul 2011 17:43:39 +0200 Subject: Removes timers for stub interfaces. Also fixes some minor bugs. --- proto/ospf/hello.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'proto/ospf/hello.c') diff --git a/proto/ospf/hello.c b/proto/ospf/hello.c index 76c95c4..0a94e4c 100644 --- a/proto/ospf/hello.c +++ b/proto/ospf/hello.c @@ -217,15 +217,14 @@ ospf_hello_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa, if (ifa->type == OSPF_IT_NBMA) { if ((ifa->priority == 0) && (n->priority > 0)) - ospf_hello_send(NULL, OHS_HELLO, n); + ospf_hello_send(n->ifa, OHS_HELLO, n); } ospf_neigh_sm(n, INM_HELLOREC); } void -ospf_hello_send(timer *timer, int kind, struct ospf_neighbor *dirn) +ospf_hello_send(struct ospf_iface *ifa, int kind, struct ospf_neighbor *dirn) { - struct ospf_iface *ifa; struct ospf_hello_packet *pkt; struct ospf_packet *op; struct proto *p; @@ -234,11 +233,6 @@ ospf_hello_send(timer *timer, int kind, struct ospf_neighbor *dirn) int i; struct nbma_node *nb; - if (timer == NULL) - ifa = dirn->ifa; - else - ifa = (struct ospf_iface *) timer->data; - if (ifa->state <= OSPF_IS_LOOP) return; @@ -313,7 +307,7 @@ ospf_hello_send(timer *timer, int kind, struct ospf_neighbor *dirn) break; case OSPF_IT_NBMA: - if (timer == NULL) /* Response to received hello */ + if (dirn) /* Response to received hello */ { ospf_send_to(ifa, dirn->ip); break; -- cgit v1.2.3