-/* $OpenBSD: pipex.c,v 1.150 2023/11/28 13:23:20 bluhm Exp $ */
+/* $OpenBSD: pipex.c,v 1.151 2023/12/01 20:30:22 mvs Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
void
pipex_timer_start(void)
{
- timeout_set_proc(&pipex_timer_ch, pipex_timer, NULL);
+ timeout_set_flags(&pipex_timer_ch, pipex_timer, NULL,
+ KCLOCK_NONE, TIMEOUT_PROC | TIMEOUT_MPSAFE);
timeout_add_sec(&pipex_timer_ch, pipex_prune);
}
{
struct pipex_session *session, *session_tmp;
- timeout_add_sec(&pipex_timer_ch, pipex_prune);
-
mtx_enter(&pipex_list_mtx);
/* walk through */
LIST_FOREACH_SAFE(session, &pipex_session_list, session_list,
}
}
+ if (LIST_FIRST(&pipex_session_list))
+ timeout_add_sec(&pipex_timer_ch, pipex_prune);
+
mtx_leave(&pipex_list_mtx);
}