apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r478328 - /apr/apr/branches/1.2.x/test/testsock.c
Date Wed, 22 Nov 2006 21:26:53 GMT
Author: wrowe
Date: Wed Nov 22 13:26:52 2006
New Revision: 478328

URL: http://svn.apache.org/viewvc?view=rev&rev=478328
Log:
Better exception handling of deferred socket connect outcomes.

Backports: 478327

Modified:
    apr/apr/branches/1.2.x/test/testsock.c

Modified: apr/apr/branches/1.2.x/test/testsock.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testsock.c?view=diff&rev=478328&r1=478327&r2=478328
==============================================================================
--- apr/apr/branches/1.2.x/test/testsock.c (original)
+++ apr/apr/branches/1.2.x/test/testsock.c Wed Nov 22 13:26:52 2006
@@ -231,12 +231,18 @@
      * succeed (if the connection can be established synchronously),
      * but if it does, this test cannot proceed.  */
     rv = apr_socket_connect(cd, sa);
-    if (!APR_STATUS_IS_EINPROGRESS(rv)) {
+    if (rv == APR_SUCCESS) {
         apr_socket_close(ld);
         apr_socket_close(cd);
-        APR_ASSERT_SUCCESS(tc, "connect to listener", rv);
         ABTS_NOT_IMPL(tc, "Cannot test if connect completes "
                       "synchronously");
+        return;
+    }
+
+    if (!APR_STATUS_IS_EINPROGRESS(rv)) {
+        apr_socket_close(ld);
+        apr_socket_close(cd);
+        APR_ASSERT_SUCCESS(tc, "connect to listener", rv);
         return;
     }
 



Mime
View raw message