OSSP CVS Repository

ossp - Difference in ossp-pkg/sa/sa.c versions 1.83 and 1.84
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/sa/sa.c 1.83 -> 1.84

--- sa.c 2004/06/11 10:30:34     1.83
+++ sa.c 2004/06/26 11:16:02     1.84
@@ -989,7 +989,7 @@
 #if defined(SO_LINGER)
                     struct linger linger;
                     linger.l_onoff  = (sa->optInfo[i].value == 0 ? 0 : 1);
-                    linger.l_linger = sa->optInfo[i].value;
+                    linger.l_linger = (sa->optInfo[i].value <= 0 ? 0 : sa->optInfo[i].value);
                     if (setsockopt(sa->fdSocket, SOL_SOCKET, SO_LINGER,
                                    (const void *)&linger,
                                    (socklen_t)sizeof(struct linger)) < 0)
@@ -1339,7 +1339,7 @@
         }
         case SA_OPTION_LINGER: {
 #if defined(SO_LINGER)
-            int amount = ((int)va_arg(ap, int) ? 1 : 0);
+            int amount = (int)va_arg(ap, int);
             sa->optInfo[SA_OPTION_LINGER].value = amount;
             sa->optInfo[SA_OPTION_LINGER].todo = TRUE;
 #else

CVSTrac 2.0.1