diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2012-11-29 14:53:25 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2012-11-29 14:53:25 +0000 |
commit | 61a5037d0d5b16a1ed89511e0ee1752c432523e4 (patch) | |
tree | b5679b4ef154728b07f3753d644a60e596244019 /usr.sbin/snmpd/snmpd.c | |
parent | f60c3c6929b68d0f0942c42dd8ca1b1a4ec1c70a (diff) |
Wrong argument was passed to control_dispatch_imsg(). Use always
(struct imsgev *)->data for the argument of imsgev handlers.
ok reyk
Diffstat (limited to 'usr.sbin/snmpd/snmpd.c')
-rw-r--r-- | usr.sbin/snmpd/snmpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/snmpd.c b/usr.sbin/snmpd/snmpd.c index 75775982de4..57aaeebf317 100644 --- a/usr.sbin/snmpd/snmpd.c +++ b/usr.sbin/snmpd/snmpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpd.c,v 1.14 2012/09/18 08:29:09 reyk Exp $ */ +/* $OpenBSD: snmpd.c,v 1.15 2012/11/29 14:53:24 yasuoka Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -210,6 +210,7 @@ main(int argc, char *argv[]) imsg_init(&iev_snmpe->ibuf, pipe_parent2snmpe[0]); iev_snmpe->handler = snmpd_dispatch_snmpe; + iev_snmpe->data = iev_snmpe; iev_snmpe->events = EV_READ; event_set(&iev_snmpe->ev, iev_snmpe->ibuf.fd, iev_snmpe->events, @@ -269,7 +270,7 @@ imsg_event_add(struct imsgev *iev) iev->events |= EV_WRITE; event_del(&iev->ev); - event_set(&iev->ev, iev->ibuf.fd, iev->events, iev->handler, iev); + event_set(&iev->ev, iev->ibuf.fd, iev->events, iev->handler, iev->data); event_add(&iev->ev, NULL); } |