summaryrefslogtreecommitdiff
path: root/ripd/ripd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r--ripd/ripd.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 9e8c21da31..58c8aed130 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -14,10 +14,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -2624,8 +2623,9 @@ rip_triggered_update (struct thread *t)
update is triggered when the timer expires. */
interval = (random () % 5) + 1;
- rip->t_triggered_interval =
- thread_add_timer (master, rip_triggered_interval, NULL, interval);
+ rip->t_triggered_interval = NULL;
+ thread_add_timer(master, rip_triggered_interval, NULL, interval,
+ &rip->t_triggered_interval);
return 0;
}
@@ -2780,21 +2780,20 @@ rip_event (enum rip_event event, int sock)
switch (event)
{
case RIP_READ:
- rip->t_read = thread_add_read (master, rip_read, NULL, sock);
+ rip->t_read = NULL;
+ thread_add_read(master, rip_read, NULL, sock, &rip->t_read);
break;
case RIP_UPDATE_EVENT:
RIP_TIMER_OFF (rip->t_update);
jitter = rip_update_jitter (rip->update_time);
- rip->t_update =
- thread_add_timer (master, rip_update, NULL,
- sock ? 2 : rip->update_time + jitter);
+ thread_add_timer(master, rip_update, NULL, sock ? 2 : rip->update_time + jitter,
+ &rip->t_update);
break;
case RIP_TRIGGERED_UPDATE:
if (rip->t_triggered_interval)
- rip->trigger = 1;
- else if (! rip->t_triggered_update)
- rip->t_triggered_update =
- thread_add_event (master, rip_triggered_update, NULL, 0);
+ rip->trigger = 1;
+ else thread_add_event(master, rip_triggered_update, NULL, 0,
+ &rip->t_triggered_update);
break;
default:
break;