diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2012-12-13 06:59:37 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2012-12-13 06:59:37 +0000 |
commit | 5d424d8390d4d1b6ea61c6fdf1fb97c15e526ddc (patch) | |
tree | 187f811a1810845573d8ee225c42d0604f40773a /sys/net | |
parent | 2af94fe975141b03ebb59ad59fdcba00f3061b3a (diff) |
pipex_init can be called multiple times (by whatever subsystems want to use
it), so return early if the work has already been done.
ok yasuoka@ jmatthew@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pipex.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/pipex.c b/sys/net/pipex.c index 90b19e3ceac..0221fd29fb9 100644 --- a/sys/net/pipex.c +++ b/sys/net/pipex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pipex.c,v 1.35 2012/09/28 16:09:05 markus Exp $ */ +/* $OpenBSD: pipex.c,v 1.36 2012/12/13 06:59:36 dlg Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -129,6 +129,11 @@ pipex_init(void) { extern int max_keylen; /* for radix.c */ + if (pipex_softintr != NULL) { + printf("pipex_init called twice\n"); + return; + } + LIST_INIT(&pipex_session_list); LIST_INIT(&pipex_close_wait_list); |