OSSP CVS Repository

ossp - Check-in [1483]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1483
Date: 2002-Jan-02 14:27:11 (local)
2002-Jan-02 13:27:11 (UTC)
User:rse
Branch:
Comment: complain if no socket is available for SA_OPTION_NONBLOCK
Tickets:
Inspections:
Files:
ossp-pkg/sa/sa.c      1.46 -> 1.47     4 inserted, 0 deleted

ossp-pkg/sa/sa.c 1.46 -> 1.47

--- sa.c 2002/01/02 13:21:07     1.46
+++ sa.c 2002/01/02 13:27:11     1.47
@@ -1147,6 +1147,10 @@
             /* enable/disable non-blocking I/O mode */
             int flags;
             int mode = (int)va_arg(ap, int);
+            if (sa->fdSocket == -1) {
+                rv = SA_ERR_USE;
+                break;
+            }
             if ((flags = fcntl(sa->fdSocket, F_GETFL, 0)) < 0) {
                 rv = SA_ERR_SYS;
                 break;

CVSTrac 2.0.1