httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1734571 - in /httpd/httpd/trunk/modules/http2: h2_conn_io.c h2_conn_io.h h2_session.c
Date Fri, 11 Mar 2016 14:18:18 GMT
Author: icing
Date: Fri Mar 11 14:18:18 2016
New Revision: 1734571

URL: http://svn.apache.org/viewvc?rev=1734571&view=rev
Log:
mod_http2: simpler flushing on master out

Modified:
    httpd/httpd/trunk/modules/http2/h2_conn_io.c
    httpd/httpd/trunk/modules/http2/h2_conn_io.h
    httpd/httpd/trunk/modules/http2/h2_session.c

Modified: httpd/httpd/trunk/modules/http2/h2_conn_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_conn_io.c?rev=1734571&r1=1734570&r2=1734571&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_conn_io.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_conn_io.c Fri Mar 11 14:18:18 2016
@@ -208,11 +208,6 @@ static apr_status_t h2_conn_io_flush_int
     return APR_SUCCESS;
 }
 
-apr_status_t h2_conn_io_pass(h2_conn_io *io, int flush)
-{
-    return h2_conn_io_flush_int(io, flush, 0);
-}
-
 apr_status_t h2_conn_io_flush(h2_conn_io *io)
 {
     /* make sure we always write a flush, even if our buffers are empty.
@@ -232,7 +227,7 @@ apr_status_t h2_conn_io_consider_pass(h2
     }
     len += io->buflen;
     if (len >= WRITE_BUFFER_SIZE) {
-        return h2_conn_io_pass(io, 0);
+        return h2_conn_io_flush_int(io, 0, 0);
     }
     return APR_SUCCESS;
 }
@@ -259,13 +254,13 @@ apr_status_t h2_conn_io_write(h2_conn_io
                       "h2_conn_io: buffering %ld bytes", (long)length);
                       
         if (!APR_BRIGADE_EMPTY(io->output)) {
-            status = h2_conn_io_pass(io, 0);
+            status = h2_conn_io_flush_int(io, 0, 0);
         }
         
         while (length > 0 && (status == APR_SUCCESS)) {
             apr_size_t avail = io->bufsize - io->buflen;
             if (avail <= 0) {
-                h2_conn_io_pass(io, 0);
+                h2_conn_io_flush_int(io, 0, 0);
             }
             else if (length > avail) {
                 memcpy(io->buffer + io->buflen, buf, avail);

Modified: httpd/httpd/trunk/modules/http2/h2_conn_io.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_conn_io.h?rev=1734571&r1=1734570&r2=1734571&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_conn_io.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_conn_io.h Fri Mar 11 14:18:18 2016
@@ -77,7 +77,6 @@ apr_status_t h2_conn_io_write_eoc(h2_con
  * @param io the connection io
  * @param flush if a flush bucket should be appended to any output
  */
-apr_status_t h2_conn_io_pass(h2_conn_io *io, int flush);
 apr_status_t h2_conn_io_flush(h2_conn_io *io);
 
 /**

Modified: httpd/httpd/trunk/modules/http2/h2_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1734571&r1=1734570&r2=1734571&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_session.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_session.c Fri Mar 11 14:18:18 2016
@@ -686,7 +686,7 @@ static apr_status_t h2_session_shutdown(
                           h2_mplx_get_max_stream_started(session->mplx), 
                           reason, (uint8_t*)err, err? strlen(err):0);
     status = nghttp2_session_send(session->ngh2);
-    h2_conn_io_pass(&session->io, 1);
+    h2_conn_io_flush(&session->io);
     ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03069)
                   "session(%ld): sent GOAWAY, err=%d, msg=%s", 
                   session->id, reason, err? err : "");
@@ -1018,7 +1018,6 @@ static apr_status_t h2_session_start(h2_
         }
     }
     
-    h2_conn_io_pass(&session->io, 1);
     return status;
 }
 
@@ -2019,7 +2018,6 @@ apr_status_t h2_session_process(h2_sessi
                 update_child_status(session, (no_streams? SERVER_BUSY_KEEPALIVE
                                               : SERVER_BUSY_READ), "idle");
                 /* make certain, the client receives everything before we idle */
-                h2_conn_io_flush(&session->io);
                 if (!session->keep_sync_until 
                     && async && no_streams && !session->r &&
session->requests_received) {
                     ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, c,
@@ -2183,8 +2181,6 @@ apr_status_t h2_session_process(h2_sessi
                                   "h2_session: wait for data, %ld micros", 
                                   (long)session->wait_us);
                 }
-                /* make certain, the client receives everything before we idle */
-                h2_conn_io_flush(&session->io);
                 status = h2_mplx_out_trywait(session->mplx, session->wait_us, 
                                              session->iowait);
                 if (status == APR_SUCCESS) {
@@ -2217,7 +2213,7 @@ apr_status_t h2_session_process(h2_sessi
                 break;
         }
 
-        h2_conn_io_pass(&session->io, 1);
+        h2_conn_io_flush(&session->io);
         if (!nghttp2_session_want_read(session->ngh2) 
                  && !nghttp2_session_want_write(session->ngh2)) {
             dispatch_event(session, H2_SESSION_EV_NGH2_DONE, 0, NULL); 



Mime
View raw message