diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2016-11-20 08:43:37 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2016-11-20 08:43:37 +0000 |
commit | 42579984dfb52b4aa2ea48eb583af59dc13954ec (patch) | |
tree | 60e1628db013c647dd9499c44cb95b59f2e322ad /usr.sbin/smtpd/bounce.c | |
parent | db2ca73f0780fd3040a101e4d9585cbc52855188 (diff) |
add dedicated functions to set fd and callback on a struct io.
simplify io_init() prototype.
ok sunil@ gilles@
Diffstat (limited to 'usr.sbin/smtpd/bounce.c')
-rw-r--r-- | usr.sbin/smtpd/bounce.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/bounce.c b/usr.sbin/smtpd/bounce.c index 505ae915ce4..05144e03b37 100644 --- a/usr.sbin/smtpd/bounce.c +++ b/usr.sbin/smtpd/bounce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bounce.c,v 1.73 2016/11/16 21:30:37 eric Exp $ */ +/* $OpenBSD: bounce.c,v 1.74 2016/11/20 08:43:36 eric Exp $ */ /* * Copyright (c) 2009 Gilles Chehade <gilles@poolp.org> @@ -230,7 +230,9 @@ bounce_fd(int fd) s->smtpname = xstrdup(msg->smtpname, "bounce_fd"); s->state = BOUNCE_EHLO; iobuf_xinit(&s->iobuf, 0, 0, "bounce_run"); - io_init(&s->io, fd, s, bounce_io, &s->iobuf); + io_init(&s->io, &s->iobuf); + io_set_callback(&s->io, bounce_io, s); + io_set_fd(&s->io, fd); io_set_timeout(&s->io, 30000); io_set_read(&s->io); s->boundary = generate_uid(); |