apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r892393 - /apr/apr/trunk/poll/unix/pollset.c
Date Fri, 18 Dec 2009 22:54:48 GMT
Author: wrowe
Date: Fri Dec 18 22:54:48 2009
New Revision: 892393

URL: http://svn.apache.org/viewvc?rev=892393&view=rev
Log:
Add result values

Modified:
    apr/apr/trunk/poll/unix/pollset.c

Modified: apr/apr/trunk/poll/unix/pollset.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/pollset.c?rev=892393&r1=892392&r2=892393&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/pollset.c (original)
+++ apr/apr/trunk/poll/unix/pollset.c Fri Dec 18 22:54:48 2009
@@ -55,15 +55,19 @@
 
 static apr_status_t close_wakeup_pipe(apr_pollset_t *pollset)
 {
+    apr_status_t rv0 = APR_SUCCESS;
+    apr_status_t rv1 = APR_SUCCESS;
+
     /* Close both sides of the wakeup pipe */
     if (pollset->wakeup_pipe[0]) {
-        file_socket_pipe_close(pollset->wakeup_pipe[0]);
+        rv0 = file_socket_pipe_close(pollset->wakeup_pipe[0]);
         pollset->wakeup_pipe[0] = NULL;
     }
     if (pollset->wakeup_pipe[1]) {
-        file_socket_pipe_close(pollset->wakeup_pipe[1]);
+        rv1 = file_socket_pipe_close(pollset->wakeup_pipe[1]);
         pollset->wakeup_pipe[1] = NULL;
     }
+    return rv0 ? rv0 : rv1;
 }
 
 #else /* !WIN32 */
@@ -127,13 +131,14 @@
 {
     /* Close both sides of the wakeup pipe */
     if (pollset->wakeup_pipe[0]) {
-        apr_file_close(pollset->wakeup_pipe[0]);
+        rv0 = apr_file_close(pollset->wakeup_pipe[0]);
         pollset->wakeup_pipe[0] = NULL;
     }
     if (pollset->wakeup_pipe[1]) {
-        apr_file_close(pollset->wakeup_pipe[1]);
+        rv1 = apr_file_close(pollset->wakeup_pipe[1]);
         pollset->wakeup_pipe[1] = NULL;
     }
+    return rv0 ? rv0 : rv1;
 }
 
 #endif /* APR_FILES_AS_SOCKETS */



Mime
View raw message