summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mta_session.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2016-11-16 21:30:38 +0000
committerEric Faurot <eric@cvs.openbsd.org>2016-11-16 21:30:38 +0000
commit1b6a0fa8aedde0f160cd8de3ced53b356e9c5efc (patch)
treedabc8a152a3fd599e3f67ef468f84f3853858e40 /usr.sbin/smtpd/mta_session.c
parent17f352d0183e5bfd5a6c98f7d33e715e4e3de898 (diff)
pass the user pointer as parameter to the io callback instead of having
the user dereference the io structure. ok millert@ gilles@
Diffstat (limited to 'usr.sbin/smtpd/mta_session.c')
-rw-r--r--usr.sbin/smtpd/mta_session.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c
index 9a8803a29a8..b1e0ff39f1a 100644
--- a/usr.sbin/smtpd/mta_session.c
+++ b/usr.sbin/smtpd/mta_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta_session.c,v 1.83 2016/05/22 16:31:21 gilles Exp $ */
+/* $OpenBSD: mta_session.c,v 1.84 2016/11/16 21:30:37 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -135,7 +135,7 @@ struct mta_session {
static void mta_session_init(void);
static void mta_start(int fd, short ev, void *arg);
-static void mta_io(struct io *, int);
+static void mta_io(struct io *, int, void *);
static void mta_free(struct mta_session *);
static void mta_on_ptr(void *, void *, void *);
static void mta_on_timeout(struct runq *, void *);
@@ -363,7 +363,7 @@ mta_session_imsg(struct mproc *p, struct imsg *imsg)
return;
}
- mta_io(&s->io, IO_TLSVERIFIED);
+ mta_io(&s->io, IO_TLSVERIFIED, s->io.arg);
io_resume(&s->io, IO_PAUSE_IN);
io_reload(&s->io);
return;
@@ -1134,9 +1134,9 @@ mta_response(struct mta_session *s, char *line)
}
static void
-mta_io(struct io *io, int evt)
+mta_io(struct io *io, int evt, void *arg)
{
- struct mta_session *s = io->arg;
+ struct mta_session *s = arg;
char *line, *msg, *p;
size_t len;
const char *error;