diff options
| author | Russ White <russ@riw.us> | 2017-05-10 13:51:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-10 13:51:47 -0400 |
| commit | 00a1578051ceeb26b0b9c2c3344cac1f202e047d (patch) | |
| tree | 248b55b1ab56e39025d9902c53564286558eda60 /pimd/pim_pim.c | |
| parent | 0896b755080b300116d493444bfc05e2ef7ca9f6 (diff) | |
| parent | c94671b82f790492ceee226f98a65ad7e7e09967 (diff) | |
Merge pull request #408 from qlyoung/remove-thread-macros
*: remove THREAD_ON macros, add nullity check
Diffstat (limited to 'pimd/pim_pim.c')
| -rw-r--r-- | pimd/pim_pim.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index 9886cd6ad2..57b9e6c793 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -383,8 +383,8 @@ static void pim_sock_read_on(struct interface *ifp) pim_ifp->pim_sock_fd); } pim_ifp->t_pim_sock_read = NULL; - THREAD_READ_ON(master, pim_ifp->t_pim_sock_read, pim_sock_read, ifp, - pim_ifp->pim_sock_fd); + thread_add_read(master, pim_sock_read, ifp, pim_ifp->pim_sock_fd, + &pim_ifp->t_pim_sock_read); } static int pim_sock_open(struct interface *ifp) @@ -703,9 +703,8 @@ static void hello_resched(struct interface *ifp) pim_ifp->pim_hello_period, ifp->name); } THREAD_OFF(pim_ifp->t_pim_hello_timer); - THREAD_TIMER_ON(master, pim_ifp->t_pim_hello_timer, - on_pim_hello_send, - ifp, pim_ifp->pim_hello_period); + thread_add_timer(master, on_pim_hello_send, ifp, pim_ifp->pim_hello_period, + &pim_ifp->t_pim_hello_timer); } /* @@ -814,9 +813,8 @@ void pim_hello_restart_triggered(struct interface *ifp) random_msec, ifp->name); } - THREAD_TIMER_MSEC_ON(master, pim_ifp->t_pim_hello_timer, - on_pim_hello_send, - ifp, random_msec); + thread_add_timer_msec(master, on_pim_hello_send, ifp, random_msec, + &pim_ifp->t_pim_hello_timer); } int pim_sock_add(struct interface *ifp) |
