OSSP CVS Repository

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

ossp-pkg/sa/sa.c 1.48 -> 1.49

--- sa.c 2002/01/02 13:35:36     1.48
+++ sa.c 2002/01/02 13:44:48     1.49
@@ -1143,6 +1143,21 @@
 #endif
             break;
         }
+        case SA_OPTION_LINGER: {
+#if defined(SO_LINGER)
+            struct linger *linger = (struct linger *)va_arg(ap, void *);
+            if (sa->fdSocket == -1) {
+                rv = SA_ERR_USE;
+                break;
+            }
+            if (setsockopt(sa->fdSocket, SOL_SOCKET, SO_LINGER, 
+                           linger, sizeof(struct linger)) < 0)
+                rv = SA_ERR_SYS;
+#else
+            rv = SA_ERR_IMP;
+#endif
+            break;
+        }
         case SA_OPTION_REUSEADDR:
         case SA_OPTION_REUSEPORT: {
             /* enable/disable reusability of binding to address or port */

CVSTrac 2.0.1