--- /usr/src/linux/net/core/sock.c.orig Sun Mar 2 19:43:18 1997
+++ /usr/src/linux/net/core/sock.c Sun Mar 2 19:33:22 1997
@@ -327,20 +327,14 @@
break;
case SO_LINGER:
- {
- int err;
len=min(len,sizeof(ling));
- if (put_user(len, optlen))
- if (!err) {
- ling.l_onoff=sk->linger;
- ling.l_linger=sk->lingertime;
- err = copy_to_user(optval,&ling,len);
- if (err)
- err = -EFAULT;
- }
- return err;
- }
-
+ if(put_user(len, optlen))
+ return -EFAULT;
+ ling.l_onoff=sk->linger;
+ ling.l_linger=sk->lingertime;
+ if(copy_to_user(optval,&ling,len))
+ return -EFAULT;
+ return 0;
case SO_BSDCOMPAT:
val = sk->bsdism;
break;
-----------------------------
Cheers,
Dick Johnson
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.27 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-