From dd6260d67fca912de7bf4260fa09f45c9f3479f2 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Thu, 4 Feb 2010 13:00:21 +0000 Subject: In event_again() call event_del() before calling event_set() so we don't get into a situation where we are calling event_set() on an event that was already added. ok claudio@ --- usr.sbin/relayd/relayd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin/relayd/relayd.c') diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index b0e89f61460..325806eb3e3 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.94 2010/01/11 06:40:14 jsg Exp $ */ +/* $OpenBSD: relayd.c,v 1.95 2010/02/04 13:00:20 jsg Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter @@ -984,6 +984,7 @@ event_again(struct event *ev, int fd, short event, if (timercmp(&tv_next, &tv, >)) bcopy(&tv_next, &tv, sizeof(tv)); + event_del(ev); event_set(ev, fd, event, fn, arg); event_add(ev, &tv); } -- cgit v1.2.3