summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2009-10-26 14:02:41 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2009-10-26 14:02:41 +0000
commit88e1350ee7625423ad214be8055e1d70dc5b6ecd (patch)
treeece1d06a3712525cb93f79b01cb7118d6b164ae5
parent6de1303488ca3ea0f50e9170e2419d7ba496be49 (diff)
downloadlibapr-88e1350ee7625423ad214be8055e1d70dc5b6ecd.tar.gz
merge r829789 from trunk:
Work around bogus return code in some circumstances with 32-bit port_getn() on Solaris 10 x86. AFAICT this problem only occurs when the return code should be zero, so changing the return code check should be sufficient. APR 1.3.8 wasn't affected. PR: 48029 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@829803 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES5
-rw-r--r--poll/unix/port.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 5d39e7198..9cddfeb34 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,11 @@
-*- coding: utf-8 -*-
Changes for APR 1.3.10
+ *) Solaris pollset support: Fix a 1.3.9 regression in apr_pollset_poll()
+ which resulted in invalid return codes from the APR function. A work-
+ around was needed for bad return codes from 32-bit port_getn() on
+ Solaris 10 x86. PR 48029. [Jeff Trawick]
+
*) The implementation of expand_array() in tables/apr_hash.c allocates
a new bucket array, without making any attempt to release the memory
allocated for the previous bucket array. That wastes memory: if the
diff --git a/poll/unix/port.c b/poll/unix/port.c
index 573035e5e..34a746289 100644
--- a/poll/unix/port.c
+++ b/poll/unix/port.c
@@ -101,8 +101,11 @@ static apr_status_t call_port_getn(int port, port_event_t list[],
}
ret = port_getn(port, list, max, nget, tvptr);
+ /* Note: 32-bit port_getn() on Solaris 10 x86 returns large negative
+ * values instead of 0 when returning immediately.
+ */
- if (ret < 0) {
+ if (ret == -1) {
rv = apr_get_netos_error();
switch(rv) {