From 81652c8aad2c4e7c6dfc7d39ba9e9e165bc12308 Mon Sep 17 00:00:00 2001 From: forsyth Date: Wed, 30 Sep 2009 02:58:09 +0100 Subject: 20090930-0258 --- emu/Nt/ipif.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'emu/Nt') diff --git a/emu/Nt/ipif.c b/emu/Nt/ipif.c index 4e3dba23..327d5471 100644 --- a/emu/Nt/ipif.c +++ b/emu/Nt/ipif.c @@ -290,24 +290,6 @@ so_bind(int fd, int su, unsigned long addr, unsigned short port) oserror(); } -void -so_setsockopt(int fd, int opt, int value) -{ - int r; - struct linger l; - - if(opt == SO_LINGER){ - l.l_onoff = 1; - l.l_linger = (short) value; - osenter(); - r = setsockopt(fd, SOL_SOCKET, opt, (char *)&l, sizeof(l)); - osleave(); - }else - error(Ebadctl); - if(r < 0) - oserror(); -} - int so_gethostbyname(char *host, char**hostv, int n) { @@ -370,13 +352,13 @@ so_getservbyname(char *service, char *net, char *port) } int -so_hangup(int fd, int linger) +so_hangup(int fd, int nolinger) { int r; - static struct linger l = {1, 1000}; + static struct linger l = {1, 0}; osenter(); - if(linger) + if(nolinger) setsockopt(fd, SOL_SOCKET, SO_LINGER, (char*)&l, sizeof(l)); r = closesocket(fd); osleave(); -- cgit v1.2.3