OSSP CVS Repository

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

Check-in Number: 1081
Date: 2001-Oct-05 15:19:30 (local)
2001-Oct-05 13:19:30 (UTC)
User:rse
Branch:
Comment: fix sa_connect() if no timeout is set
Tickets:
Inspections:
Files:
ossp-pkg/sa/sa.c      1.6 -> 1.7     6 inserted, 2 deleted

ossp-pkg/sa/sa.c 1.6 -> 1.7

--- sa.c 2001/10/05 13:17:36     1.6
+++ sa.c 2001/10/05 13:19:30     1.7
@@ -682,8 +682,12 @@
         if ((rv = sa_socket_init(sa, raddr->nFamily)) != SA_OK)
             return rv;
 
-    if (!sa->bTimeout)
-        return connect(sa->sSocket, raddr->saBuf, raddr->slBuf);
+    if (!sa->bTimeout) {
+        if (connect(sa->sSocket, raddr->saBuf, raddr->slBuf) < 0)
+            return SA_ERR_SYS;
+        else
+            return SA_OK;
+    }
 
     error = 0;
     rv = SA_OK;

CVSTrac 2.0.1