From 3a62556310e73c4d132c0f740b37e7683ce3df6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 14 Jan 2000 15:37:18 +0000 Subject: [PATCH] Do this the Right Way (tm), i.e. use shutdown() instead of fooling around with the size of the receive buffer. Pointed out by: ru --- usr.sbin/syslogd/syslogd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 25d4e4236516..8cc19788b769 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -418,12 +418,8 @@ main(argc, argv) } } if (finet >= 0 && SecureMode) { - int bufsize; - - bufsize = 1; - if (setsockopt(finet, SOL_SOCKET, SO_RCVBUF, - &bufsize, sizeof bufsize) < 0) { - logerror("setsockopt"); + if (shutdown(finet, SHUT_RD) < 0) { + logerror("shutdown"); if (!Debug) die(0); }