summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2010-12-22 16:37:53 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2010-12-22 16:37:53 +0000
commitd0f06aea343d3243d5c169eb422d817cb2d84a02 (patch)
tree6b9511eaaf920c199c031f2fc5ad5226cdc7b6e1 /sbin
parent4310be875af2417e521d40b187fb775e55e473b3 (diff)
Fix a little control socket bug, as discussed with mikeb@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/control.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/iked/control.c b/sbin/iked/control.c
index 79c94d2a302..3ef1023d945 100644
--- a/sbin/iked/control.c
+++ b/sbin/iked/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.4 2010/12/21 13:24:11 mikeb Exp $ */
+/* $OpenBSD: control.c,v 1.5 2010/12/22 16:37:52 reyk Exp $ */
/* $vantronix: control.c,v 1.4 2010/05/14 07:35:52 reyk Exp $ */
/*
@@ -165,8 +165,9 @@ control_accept(int listenfd, short event, void *arg)
imsg_init(&c->iev.ibuf, connfd);
c->iev.handler = control_dispatch_imsg;
c->iev.events = EV_READ;
+ c->iev.data = env;
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
- c->iev.handler, env);
+ c->iev.handler, c->iev.data);
event_add(&c->iev.ev, NULL);
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);