You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2009/10/26 14:31:44 UTC

svn commit: r829789 - /apr/apr/trunk/poll/unix/port.c

Author: trawick
Date: Mon Oct 26 13:31:43 2009
New Revision: 829789

URL: http://svn.apache.org/viewvc?rev=829789&view=rev
Log:
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/trunk/poll/unix/port.c

Modified: apr/apr/trunk/poll/unix/port.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/port.c?rev=829789&r1=829788&r2=829789&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/port.c (original)
+++ apr/apr/trunk/poll/unix/port.c Mon Oct 26 13:31:43 2009
@@ -104,8 +104,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) {