diff options
Diffstat (limited to 'usr.sbin/smtpd/util.c')
-rw-r--r-- | usr.sbin/smtpd/util.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c index 8e62e941660..4f4094d5b76 100644 --- a/usr.sbin/smtpd/util.c +++ b/usr.sbin/smtpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.125 2016/01/12 17:29:43 sunil Exp $ */ +/* $OpenBSD: util.c,v 1.126 2016/03/25 15:06:58 krw Exp $ */ /* * Copyright (c) 2000,2001 Markus Friedl. All rights reserved. @@ -664,33 +664,6 @@ generate_uid(void) return (uid); } -void -session_socket_blockmode(int fd, enum blockmodes bm) -{ - int flags; - - if ((flags = fcntl(fd, F_GETFL, 0)) == -1) - fatal("fcntl F_GETFL"); - - if (bm == BM_NONBLOCK) - flags |= O_NONBLOCK; - else - flags &= ~O_NONBLOCK; - - if ((flags = fcntl(fd, F_SETFL, flags)) == -1) - fatal("fcntl F_SETFL"); -} - -void -session_socket_no_linger(int fd) -{ - struct linger lng; - - memset(&lng, 0, sizeof(lng)); - if (setsockopt(fd, SOL_SOCKET, SO_LINGER, &lng, sizeof(lng)) == -1) - fatal("session_socket_no_linger"); -} - int session_socket_error(int fd) { |