diff options
Diffstat (limited to 'ldpd/neighbor.c')
-rw-r--r-- | ldpd/neighbor.c | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/ldpd/neighbor.c b/ldpd/neighbor.c index e884b3ebf..867ad92e4 100644 --- a/ldpd/neighbor.c +++ b/ldpd/neighbor.c @@ -35,13 +35,13 @@ static __inline int nbr_addr_compare(const struct nbr *, static __inline int nbr_pid_compare(const struct nbr *, const struct nbr *); static void nbr_update_peerid(struct nbr *); -static int nbr_ktimer(struct thread *); +static void nbr_ktimer(struct thread *thread); static void nbr_start_ktimer(struct nbr *); -static int nbr_ktimeout(struct thread *); +static void nbr_ktimeout(struct thread *thread); static void nbr_start_ktimeout(struct nbr *); -static int nbr_itimeout(struct thread *); +static void nbr_itimeout(struct thread *thread); static void nbr_start_itimeout(struct nbr *); -static int nbr_idtimer(struct thread *); +static void nbr_idtimer(struct thread *thread); static int nbr_act_session_operational(struct nbr *); static void nbr_send_labelmappings(struct nbr *); static __inline int nbr_params_compare(const struct nbr_params *, @@ -419,16 +419,13 @@ nbr_session_active_role(struct nbr *nbr) /* Keepalive timer: timer to send keepalive message to neighbors */ -static int -nbr_ktimer(struct thread *thread) +static void nbr_ktimer(struct thread *thread) { struct nbr *nbr = THREAD_ARG(thread); nbr->keepalive_timer = NULL; send_keepalive(nbr); nbr_start_ktimer(nbr); - - return (0); } static void @@ -451,8 +448,7 @@ nbr_stop_ktimer(struct nbr *nbr) /* Keepalive timeout: if the nbr hasn't sent keepalive */ -static int -nbr_ktimeout(struct thread *thread) +static void nbr_ktimeout(struct thread *thread) { struct nbr *nbr = THREAD_ARG(thread); @@ -461,8 +457,6 @@ nbr_ktimeout(struct thread *thread) log_debug("%s: lsr-id %pI4", __func__, &nbr->id); session_shutdown(nbr, S_KEEPALIVE_TMR, 0, 0); - - return (0); } static void @@ -482,16 +476,13 @@ nbr_stop_ktimeout(struct nbr *nbr) /* Session initialization timeout: if nbr got stuck in the initialization FSM */ -static int -nbr_itimeout(struct thread *thread) +static void nbr_itimeout(struct thread *thread) { struct nbr *nbr = THREAD_ARG(thread); log_debug("%s: lsr-id %pI4", __func__, &nbr->id); nbr_fsm(nbr, NBR_EVT_CLOSE_SESSION); - - return (0); } static void @@ -513,8 +504,7 @@ nbr_stop_itimeout(struct nbr *nbr) /* Init delay timer: timer to retry to iniziatize session */ -static int -nbr_idtimer(struct thread *thread) +static void nbr_idtimer(struct thread *thread) { struct nbr *nbr = THREAD_ARG(thread); @@ -523,8 +513,6 @@ nbr_idtimer(struct thread *thread) log_debug("%s: lsr-id %pI4", __func__, &nbr->id); nbr_establish_connection(nbr); - - return (0); } void @@ -573,8 +561,7 @@ nbr_pending_connect(struct nbr *nbr) return (nbr->ev_connect != NULL); } -static int -nbr_connect_cb(struct thread *thread) +static void nbr_connect_cb(struct thread *thread) { struct nbr *nbr = THREAD_ARG(thread); int error; @@ -585,7 +572,7 @@ nbr_connect_cb(struct thread *thread) len = sizeof(error); if (getsockopt(nbr->fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { log_warn("%s: getsockopt SOL_SOCKET SO_ERROR", __func__); - return (0); + return; } if (error) { @@ -593,12 +580,10 @@ nbr_connect_cb(struct thread *thread) errno = error; log_debug("%s: error while connecting to %s: %s", __func__, log_addr(nbr->af, &nbr->raddr), strerror(errno)); - return (0); + return; } nbr_fsm(nbr, NBR_EVT_CONNECT_UP); - - return (0); } int |