summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/relayd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/relayd/relayd.c')
-rw-r--r--usr.sbin/relayd/relayd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c
index 2de941c0367..22a72cf18c1 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.c,v 1.38 2007/07/05 09:42:26 thib Exp $ */
+/* $OpenBSD: relayd.c,v 1.39 2007/09/05 08:48:42 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -472,8 +472,8 @@ purge_config(struct hoststated *env, u_int8_t what)
if (what & PURGE_RELAYS) {
while ((rly = TAILQ_FIRST(&env->relays)) != NULL) {
TAILQ_REMOVE(&env->relays, rly, entry);
- while ((sess = TAILQ_FIRST(&rly->sessions)) != NULL) {
- TAILQ_REMOVE(&rly->sessions, sess, entry);
+ while ((sess = SPLAY_ROOT(&rly->sessions)) != NULL) {
+ SPLAY_REMOVE(session_tree, &rly->sessions, sess);
free(sess);
}
if (rly->bev != NULL)
@@ -744,7 +744,7 @@ session_find(struct hoststated *env, objid_t id)
struct session *con;
TAILQ_FOREACH(rlay, &env->relays, entry)
- TAILQ_FOREACH(con, &rlay->sessions, entry)
+ SPLAY_FOREACH(con, session_tree, &rlay->sessions)
if (con->id == id)
return (con);
return (NULL);