trawick 2003/05/30 05:15:12
Modified: . CHANGES
network_io/unix sockopt.c
Log:
Fix a bug in socket timeout handling on unix that left the
socket non-blocking after disabling the timeout.
Submitted by: Jacob Craig Lewallen <[EMAIL PROTECTED]>
Reviewed by: Jeff Trawick
Revision Changes Path
1.411 +4 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.410
retrieving revision 1.411
diff -u -r1.410 -r1.411
--- CHANGES 28 May 2003 05:07:04 -0000 1.410
+++ CHANGES 30 May 2003 12:15:11 -0000 1.411
@@ -1,5 +1,9 @@
Changes with APR 0.9.4
+ *) Fix a bug in socket timeout handling on unix that left the
+ socket non-blocking after disabling the timeout.
+ [Jacob Craig Lewallen <[EMAIL PROTECTED]>]
+
*) Added flag APR_FILE_ATTR_HIDDEN for manipulating the "hidden"
file attribute on Windows and OS/2. [Branko Cibej]
1.69 +2 -0 apr/network_io/unix/sockopt.c
Index: sockopt.c
===================================================================
RCS file: /home/cvs/apr/network_io/unix/sockopt.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- sockopt.c 4 Apr 2003 11:47:40 -0000 1.68
+++ sockopt.c 30 May 2003 12:15:12 -0000 1.69
@@ -126,6 +126,7 @@
if ((stat = sononblock(sock->socketdes)) != APR_SUCCESS) {
return stat;
}
+ apr_set_option(&sock->netmask, APR_SO_NONBLOCK, 1);
}
}
else if (t < 0 && sock->timeout >= 0) {
@@ -133,6 +134,7 @@
if ((stat = soblock(sock->socketdes)) != APR_SUCCESS) {
return stat;
}
+ apr_set_option(&sock->netmask, APR_SO_NONBLOCK, 0);
}
}
/* must disable the incomplete read support if we change to a