OSSP CVS Repository

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

Check-in Number: 4599
Date: 2004-Jun-11 12:30:34 (local)
2004-Jun-11 10:30:34 (UTC)
User:rse
Branch:
Comment: Fix timeout implementation related to SO_RCVTIMEO/SO_SNDTIMEO.
Tickets:
Inspections:
Files:
ossp-pkg/sa/ChangeLog      1.35 -> 1.36     5 inserted, 0 deleted
ossp-pkg/sa/sa.c      1.82 -> 1.83     2 inserted, 2 deleted

ossp-pkg/sa/ChangeLog 1.35 -> 1.36

--- ChangeLog    2004/04/02 18:50:06     1.35
+++ ChangeLog    2004/06/11 10:30:34     1.36
@@ -11,6 +11,11 @@
   This is a list of all changes to OSSP sa.
   For a more brief summary please have a look at the NEWS file.
 
+  Changes between 1.2.0 and 1.2.1 (02-Apr-2003 to 11-Jun-2004)
+
+   o Fix timeout implementation related to SO_RCVTIMEO/SO_SNDTIMEO.
+     [Ralf S. Engelschall, Thomas Lotterer]
+
   Changes between 1.1.0 and 1.2.0 (10-Nov-2003 to 02-Apr-2004)
 
    o In sa_connect() also select(2) on the socket if EINTR was


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

--- sa.c 2004/04/02 18:49:42     1.82
+++ sa.c 2004/06/11 10:30:34     1.83
@@ -940,13 +940,13 @@
         return SA_OK;
 
 #if defined(SO_RCVTIMEO) && defined(USE_SO_RCVTIMEO) && defined(SO_SNDTIMEO) && defined(USE_SO_SNDTIMEO)
-    if (SA_TVISZERO(sa->tvTimeout[SA_TIMEOUT_READ])) {
+    if (!SA_TVISZERO(sa->tvTimeout[SA_TIMEOUT_READ])) {
         if (setsockopt(sa->fdSocket, SOL_SOCKET, SO_RCVTIMEO,
                        (const void *)(&sa->tvTimeout[SA_TIMEOUT_READ]),
                        (socklen_t)(sizeof(sa->tvTimeout[SA_TIMEOUT_READ]))) < 0)
             return SA_RC(SA_ERR_SYS);
     }
-    if (SA_TVISZERO(sa->tvTimeout[SA_TIMEOUT_WRITE])) {
+    if (!SA_TVISZERO(sa->tvTimeout[SA_TIMEOUT_WRITE])) {
         if (setsockopt(sa->fdSocket, SOL_SOCKET, SO_SNDTIMEO,
                        (const void *)(&sa->tvTimeout[SA_TIMEOUT_WRITE]),
                        (socklen_t)(sizeof(sa->tvTimeout[SA_TIMEOUT_WRITE]))) < 0)

CVSTrac 2.0.1