apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r829803 - in /apr/apr/branches/1.3.x: CHANGES poll/unix/port.c
Date Mon, 26 Oct 2009 14:02:41 GMT
Author: trawick
Date: Mon Oct 26 14:02:41 2009
New Revision: 829803

URL: http://svn.apache.org/viewvc?rev=829803&view=rev
Log:
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

Modified:
    apr/apr/branches/1.3.x/CHANGES
    apr/apr/branches/1.3.x/poll/unix/port.c

Modified: apr/apr/branches/1.3.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/CHANGES?rev=829803&r1=829802&r2=829803&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.3.x/CHANGES [utf-8] Mon Oct 26 14:02:41 2009
@@ -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

Modified: apr/apr/branches/1.3.x/poll/unix/port.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/poll/unix/port.c?rev=829803&r1=829802&r2=829803&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/poll/unix/port.c (original)
+++ apr/apr/branches/1.3.x/poll/unix/port.c Mon Oct 26 14:02:41 2009
@@ -101,8 +101,11 @@
     }
 
     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) {



Mime
View raw message