diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2016-11-24 20:52:14 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2016-11-24 20:52:14 +0000 |
commit | 286f6f7995a516bb50a3a69c4817ae24be1f0d59 (patch) | |
tree | d1b92ba350613457624a7f01b3063674ea4a961a /usr.sbin/smtpd/smtp_session.c | |
parent | 7cc247f2eff7d7ef55b01163e2b84d8961de9917 (diff) |
add an io_fileno() accessor
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/smtp_session.c')
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 4377ef4760a..27097495d36 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.298 2016/11/24 20:44:04 eric Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.299 2016/11/24 20:52:13 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -2075,7 +2075,7 @@ smtp_lookup_servername(struct smtp_session *s) if (s->listener->hostnametable[0]) { sa_len = sizeof(ss); sa = (struct sockaddr *)&ss; - if (getsockname(s->io.sock, sa, &sa_len) == -1) { + if (getsockname(io_fileno(&s->io), sa, &sa_len) == -1) { log_warn("warn: getsockname()"); } else { @@ -2103,7 +2103,7 @@ smtp_connected(struct smtp_session *s) s->id, ss_to_text(&s->ss), s->hostname); sl = sizeof(ss); - if (getsockname(s->io.sock, (struct sockaddr*)&ss, &sl) == -1) { + if (getsockname(io_fileno(&s->io), (struct sockaddr*)&ss, &sl) == -1) { smtp_free(s, strerror(errno)); return; } |