diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-02-04 13:00:21 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-02-04 13:00:21 +0000 |
commit | dd6260d67fca912de7bf4260fa09f45c9f3479f2 (patch) | |
tree | cc33588332de62bcde7103c65f3286d679c24380 /usr.sbin/relayd/relayd.c | |
parent | 1eec8a85c0f4bb3d9230c2bbf35fa4c29384d739 (diff) |
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@
Diffstat (limited to 'usr.sbin/relayd/relayd.c')
-rw-r--r-- | usr.sbin/relayd/relayd.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <reyk@openbsd.org> @@ -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); } |