You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2016/03/10 14:37:57 UTC

svn commit: r1734413 [2/2] - in /httpd/httpd/branches/2.4.x: ./ modules/http2/

Modified: httpd/httpd/branches/2.4.x/modules/http2/mod_http2.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http2/mod_http2.c?rev=1734413&r1=1734412&r2=1734413&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/mod_http2.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http2/mod_http2.c Thu Mar 10 13:37:55 2016
@@ -128,31 +128,26 @@ static char *http2_var_lookup(apr_pool_t
                          conn_rec *, request_rec *, char *name);
 static int http2_is_h2(conn_rec *);
 
-static apr_status_t http2_req_engine_push(const char *engine_type, 
+static apr_status_t http2_req_engine_push(const char *ngn_type, 
                                           request_rec *r, 
                                           h2_req_engine_init *einit)
 {
-    return h2_mplx_engine_push(engine_type, r, einit);
+    return h2_mplx_req_engine_push(ngn_type, r, einit);
 }
 
-static apr_status_t http2_req_engine_pull(h2_req_engine *engine, 
+static apr_status_t http2_req_engine_pull(h2_req_engine *ngn, 
                                           apr_read_type_e block, 
+                                          apr_uint32_t capacity, 
                                           request_rec **pr)
 {
-    return h2_mplx_engine_pull(engine, block, pr);
+    return h2_mplx_req_engine_pull(ngn, block, capacity, pr);
 }
 
-static void http2_req_engine_done(h2_req_engine *engine, conn_rec *r_conn)
+static void http2_req_engine_done(h2_req_engine *ngn, conn_rec *r_conn)
 {
-    h2_mplx_engine_done(engine, r_conn);
+    h2_mplx_req_engine_done(ngn, r_conn);
 }
 
-static void http2_req_engine_exit(h2_req_engine *engine)
-{
-    h2_mplx_engine_exit(engine);
-}
-
-
 /* Runs once per created child process. Perform any process 
  * related initionalization here.
  */
@@ -178,7 +173,6 @@ static void h2_hooks(apr_pool_t *pool)
     APR_REGISTER_OPTIONAL_FN(http2_req_engine_push);
     APR_REGISTER_OPTIONAL_FN(http2_req_engine_pull);
     APR_REGISTER_OPTIONAL_FN(http2_req_engine_done);
-    APR_REGISTER_OPTIONAL_FN(http2_req_engine_exit);
 
     ap_log_perror(APLOG_MARK, APLOG_TRACE1, 0, pool, "installing hooks");
     

Modified: httpd/httpd/branches/2.4.x/modules/http2/mod_http2.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http2/mod_http2.h?rev=1734413&r1=1734412&r2=1734413&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/mod_http2.h (original)
+++ httpd/httpd/branches/2.4.x/modules/http2/mod_http2.h Thu Mar 10 13:37:55 2016
@@ -43,27 +43,12 @@ typedef struct h2_req_engine h2_req_engi
  * @param engine the allocated, partially filled structure
  * @param r      the first request to process, or NULL
  */
-typedef apr_status_t h2_req_engine_init(h2_req_engine *engine, request_rec *r);
-
-/**
- * The public structure of a h2_req_engine. It gets allocated by the http2
- * infrastructure, assigned id, type, pool, io and connection and passed to the
- * h2_req_engine_init() callback to complete initialization.
- * This happens whenever a new request gets "push"ed for an engine type and
- * no instance, or no free instance, for the type is available.
- */
-struct h2_req_engine {
-    const char *id;        /* identifier */
-    apr_pool_t *pool;      /* pool for engine specific allocations */
-    const char *type;      /* name of the engine type */
-    unsigned char window_bits;/* preferred size of overall response data
-                            * mod_http2 is willing to buffer as log2 */
-    unsigned char req_window_bits;/* preferred size of response body data
-                            * mod_http2 is willing to buffer per request,
-                            * as log2 */
-    apr_size_t capacity;   /* maximum concurrent requests */
-    void *user_data;       /* user specific data */
-};
+typedef apr_status_t h2_req_engine_init(h2_req_engine *engine, 
+                                        const char *id, 
+                                        const char *type,
+                                        apr_pool_t *pool, 
+                                        apr_uint32_t req_buffer_size,
+                                        request_rec *r);
 
 /**
  * Push a request to an engine with the specified name for further processing.
@@ -89,25 +74,16 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t,
  * @param timeout     wait a maximum amount of time for a new slave, 0 will not wait
  * @param pslave      the slave connection that needs processing or NULL
  * @return APR_SUCCESS if new request was assigned
- *         APR_EAGAIN/APR_TIMEUP if no new request is available
- *         APR_ECONNABORTED if the engine needs to shut down
+ *         APR_EAGAIN  if no new request is available
+ *         APR_EOF          if engine may shut down, as no more request will be scheduled
+ *         APR_ECONNABORTED if the engine needs to shut down immediately
  */
 APR_DECLARE_OPTIONAL_FN(apr_status_t, 
                         http2_req_engine_pull, (h2_req_engine *engine, 
                                                 apr_read_type_e block,
+                                                apr_uint32_t capacity,
                                                 request_rec **pr));
 APR_DECLARE_OPTIONAL_FN(void, 
                         http2_req_engine_done, (h2_req_engine *engine, 
                                                 conn_rec *rconn));
-/**
- * The given request engine is done processing and needs to be excluded
- * from further handling. 
- * @param engine      the engine to exit
- */
-APR_DECLARE_OPTIONAL_FN(void,
-                        http2_req_engine_exit, (h2_req_engine *engine));
-
-
-#define H2_TASK_ID_NOTE     "http2-task-id"
-
 #endif