]> granicus.if.org Git - apache/commitdiff
ap_bflush and ap_bclose now return ap_status_t error codes instead of
authorManoj Kasichainula <manoj@apache.org>
Tue, 26 Oct 1999 22:25:02 +0000 (22:25 +0000)
committerManoj Kasichainula <manoj@apache.org>
Tue, 26 Oct 1999 22:25:02 +0000 (22:25 +0000)
returning -1 and setting errno.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84040 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c
server/connection.c

index 39e82db6832a0658625279b3fb7ebee78e330649..cdaec1985cd3f4543f4f76920382e87512b246a1 100644 (file)
@@ -2339,13 +2339,16 @@ API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r,...)
 
 API_EXPORT(int) ap_rflush(request_rec *r)
 {
-    if (ap_bflush(r->connection->client) < 0) {
+    ap_status_t rv;
+
+    if ((rv = ap_bflush(r->connection->client)) != APR_SUCCESS) {
         if (!ap_is_aborted(r->connection)) {
-            ap_log_rerror(APLOG_MARK, APLOG_INFO, errno, r,
+            ap_log_rerror(APLOG_MARK, APLOG_INFO, rv, r,
                 "client stopped connection before rflush completed");
             ap_bsetflag(r->connection->client, B_EOUT, 1);
             r->connection->aborted = 1;
         }
+        errno = rv;
         return EOF;
     }
     return 0;
index 6f740f367ac51e8dda55d25dd2459bde86784542..de55aba4f46a14f20289f3818307ca52dfddedf2 100644 (file)
@@ -146,7 +146,7 @@ static void lingering_close(request_rec *r)
 
     /* Send any leftover data to the client, but never try to again */
 
-    if (ap_bflush(r->connection->client) == -1) {
+    if (ap_bflush(r->connection->client) != APR_SUCCESS) {
        ap_bclose(r->connection->client);
        return;
     }