]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge of r1764005 from trunk:
authorStefan Eissing <icing@apache.org>
Sun, 9 Oct 2016 20:30:40 +0000 (20:30 +0000)
committerStefan Eissing <icing@apache.org>
Sun, 9 Oct 2016 20:30:40 +0000 (20:30 +0000)
mod_http2: reverting int->apr_uint32_t changes from 1.7.x

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1764007 13f79535-47bb-0310-9956-ffa450edef68

24 files changed:
modules/http2/h2.h
modules/http2/h2_bucket_beam.c
modules/http2/h2_bucket_beam.h
modules/http2/h2_conn.c
modules/http2/h2_conn.h
modules/http2/h2_mplx.c
modules/http2/h2_mplx.h
modules/http2/h2_ngn_shed.c
modules/http2/h2_ngn_shed.h
modules/http2/h2_proxy_util.c
modules/http2/h2_proxy_util.h
modules/http2/h2_push.c
modules/http2/h2_push.h
modules/http2/h2_session.c
modules/http2/h2_stream.c
modules/http2/h2_stream.h
modules/http2/h2_task.c
modules/http2/h2_task.h
modules/http2/h2_util.c
modules/http2/h2_util.h
modules/http2/h2_version.h
modules/http2/mod_http2.c
modules/http2/mod_http2.h
modules/http2/mod_proxy_http2.c

index 03e6e3e62367c9d97fa28ce48db862e9273b6581..2f67bd8363b53ab97d736bd35e273fbb1321b1aa 100644 (file)
@@ -101,11 +101,11 @@ typedef enum {
 } h2_session_state;
 
 typedef struct h2_session_props {
-    apr_uint32_t accepted_max;      /* the highest remote stream id was/will be handled */
-    apr_uint32_t completed_max;     /* the highest remote stream completed */
-    apr_uint32_t emitted_count;     /* the number of local streams sent */
-    apr_uint32_t emitted_max;       /* the highest local stream id sent */
-    apr_uint32_t error;             /* the last session error encountered */
+    int accepted_max;      /* the highest remote stream id was/will be handled */
+    int completed_max;     /* the highest remote stream completed */
+    int emitted_count;     /* the number of local streams sent */
+    int emitted_max;       /* the highest local stream id sent */
+    int error;             /* the last session error encountered */
     unsigned int accepting : 1;     /* if the session is accepting new streams */
     unsigned int shutdown : 1;      /* if the final GOAWAY has been sent */
 } h2_session_props;
index 4397e19c76f122c67ff86e583788832bf5069611..15fb4c813cad1fe114649a873425fde3aa7c7498 100644 (file)
@@ -458,7 +458,7 @@ apr_status_t h2_beam_destroy(h2_bucket_beam *beam)
 }
 
 apr_status_t h2_beam_create(h2_bucket_beam **pbeam, apr_pool_t *red_pool, 
-                            apr_uint32_t id, const char *tag, 
+                            int id, const char *tag, 
                             apr_size_t max_buf_size)
 {
     h2_bucket_beam *beam;
index 80fa9e127d4c322ad6190caf6882b38f900ec001..6a0d4c6d28d7ac2152413ff9c690ee68e3ecd8ef 100644 (file)
@@ -170,7 +170,7 @@ typedef int h2_beam_can_beam_callback(void *ctx, h2_bucket_beam *beam,
 int h2_beam_no_files(void *ctx, h2_bucket_beam *beam, apr_file_t *file);
 
 struct h2_bucket_beam {
-    apr_uint32_t id;
+    int id;
     const char *tag;
     h2_blist red;
     h2_blist hold;
@@ -223,7 +223,7 @@ struct h2_bucket_beam {
  */
 apr_status_t h2_beam_create(h2_bucket_beam **pbeam,
                             apr_pool_t *red_pool, 
-                            apr_uint32_t id, const char *tag, 
+                            int id, const char *tag, 
                             apr_size_t buffer_size);
 
 /**
index 1d96e4c6aa1c7caf4c9fd5590e46a88923706443..2407822e238881924429fdd166bd422fda930af1 100644 (file)
@@ -241,7 +241,7 @@ apr_status_t h2_conn_pre_close(struct h2_ctx *ctx, conn_rec *c)
     return status;
 }
 
-conn_rec *h2_slave_create(conn_rec *master, apr_uint32_t slave_id, 
+conn_rec *h2_slave_create(conn_rec *master, int slave_id, 
                           apr_pool_t *parent, apr_allocator_t *allocator)
 {
     apr_pool_t *pool;
index 4c2799696ac650ac1a50b2beaa7d188c97c72b12..13b20539b1a9f5de2390e9360dc412584f7b2462 100644 (file)
@@ -66,7 +66,7 @@ typedef enum {
 h2_mpm_type_t h2_conn_mpm_type(void);
 
 
-conn_rec *h2_slave_create(conn_rec *master, apr_uint32_t slave_id, 
+conn_rec *h2_slave_create(conn_rec *master, int slave_id, 
                           apr_pool_t *parent, apr_allocator_t *allocator);
 void h2_slave_destroy(conn_rec *slave, apr_allocator_t **pallocator);
 
index 461c88d64c48649c6041fe30d472677333e7d139..4501e0a734f18c00528066574a02e9bd06411331 100644 (file)
@@ -45,7 +45,7 @@
 #include "h2_util.h"
 
 
-static void h2_beam_log(h2_bucket_beam *beam, apr_uint32_t id, const char *msg, 
+static void h2_beam_log(h2_bucket_beam *beam, int id, const char *msg, 
                         conn_rec *c, int level)
 {
     if (beam && APLOG_C_IS_LEVEL(c,level)) {
@@ -319,7 +319,7 @@ h2_mplx *h2_mplx_create(conn_rec *c, apr_pool_t *parent,
     return m;
 }
 
-apr_uint32_t h2_mplx_shutdown(h2_mplx *m)
+int h2_mplx_shutdown(h2_mplx *m)
 {
     int acquired, max_stream_started = 0;
     
@@ -702,7 +702,7 @@ apr_status_t h2_mplx_stream_done(h2_mplx *m, h2_stream *stream)
     return status;
 }
 
-h2_stream *h2_mplx_stream_get(h2_mplx *m, apr_uint32_t id)
+h2_stream *h2_mplx_stream_get(h2_mplx *m, int id)
 {
     h2_stream *s = NULL;
     int acquired;
@@ -1330,7 +1330,7 @@ apr_status_t h2_mplx_req_engine_push(const char *ngn_type,
 
 apr_status_t h2_mplx_req_engine_pull(h2_req_engine *ngn, 
                                      apr_read_type_e block, 
-                                     apr_uint32_t capacity, 
+                                     int capacity, 
                                      request_rec **pr)
 {   
     h2_ngn_shed *shed = h2_ngn_shed_get_shed(ngn);
@@ -1429,7 +1429,7 @@ apr_status_t h2_mplx_dispatch_master_events(h2_mplx *m,
                 ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, m->c, 
                               "h2_mplx(%ld-%d): on_resume", 
                               m->id, stream->id);
-                on_resume(on_ctx, stream->id);
+                on_resume(on_ctx, stream);
             }
         }
         
@@ -1438,7 +1438,7 @@ apr_status_t h2_mplx_dispatch_master_events(h2_mplx *m,
     return status;
 }
 
-apr_status_t h2_mplx_keep_active(h2_mplx *m, apr_uint32_t stream_id)
+apr_status_t h2_mplx_keep_active(h2_mplx *m, int stream_id)
 {
     apr_status_t status;
     int acquired;
index 308facd895b9d9a26c34a01aff122d3a937448f3..f7e3501783addfac0d266b6565c5eccca5588f04 100644 (file)
@@ -80,12 +80,12 @@ struct h2_mplx {
     struct h2_ihash_t *tasks;       /* all tasks started and not destroyed */
     struct h2_ihash_t *redo_tasks;  /* all tasks that need to be redone */
     
-    apr_uint32_t max_streams;        /* max # of concurrent streams */
-    apr_uint32_t max_stream_started; /* highest stream id that started processing */
-    apr_uint32_t workers_busy;       /* # of workers processing on this mplx */
-    apr_uint32_t workers_limit;      /* current # of workers limit, dynamic */
-    apr_uint32_t workers_def_limit;  /* default # of workers limit */
-    apr_uint32_t workers_max;        /* max, hard limit # of workers in a process */
+    int max_streams;        /* max # of concurrent streams */
+    int max_stream_started; /* highest stream id that started processing */
+    int workers_busy;       /* # of workers processing on this mplx */
+    int workers_limit;      /* current # of workers limit, dynamic */
+    int workers_def_limit;  /* default # of workers limit */
+    int workers_max;        /* max, hard limit # of workers in a process */
     apr_time_t last_idle_block;      /* last time, this mplx entered IDLE while
                                       * streams were ready */
     apr_time_t last_limit_change;    /* last time, worker limit changed */
@@ -103,8 +103,8 @@ struct h2_mplx {
     apr_array_header_t *spare_slaves; /* spare slave connections */
     
     struct h2_workers *workers;
-    apr_uint32_t tx_handles_reserved;
-    apr_uint32_t tx_chunk_size;
+    int tx_handles_reserved;
+    int tx_chunk_size;
     
     h2_mplx_consumed_cb *input_consumed;
     void *input_consumed_ctx;
@@ -154,7 +154,7 @@ void h2_mplx_task_done(h2_mplx *m, struct h2_task *task, struct h2_task **ptask)
  * but let the ongoing ones finish normally.
  * @return the highest stream id being/been processed
  */
-apr_uint32_t h2_mplx_shutdown(h2_mplx *m);
+int h2_mplx_shutdown(h2_mplx *m);
 
 int h2_mplx_is_busy(h2_mplx *m);
 
@@ -162,7 +162,7 @@ int h2_mplx_is_busy(h2_mplx *m);
  * IO lifetime of streams.
  ******************************************************************************/
 
-struct h2_stream *h2_mplx_stream_get(h2_mplx *m, apr_uint32_t id);
+struct h2_stream *h2_mplx_stream_get(h2_mplx *m, int id);
 
 /**
  * Notifies mplx that a stream has finished processing.
@@ -181,7 +181,7 @@ apr_status_t h2_mplx_stream_done(h2_mplx *m, struct h2_stream *stream);
 apr_status_t h2_mplx_out_trywait(h2_mplx *m, apr_interval_time_t timeout,
                                  struct apr_thread_cond_t *iowait);
 
-apr_status_t h2_mplx_keep_active(h2_mplx *m, apr_uint32_t stream_id);
+apr_status_t h2_mplx_keep_active(h2_mplx *m, int stream_id);
 
 /*******************************************************************************
  * Stream processing.
@@ -220,7 +220,7 @@ apr_status_t h2_mplx_reprioritize(h2_mplx *m, h2_stream_pri_cmp *cmp, void *ctx)
 void h2_mplx_set_consumed_cb(h2_mplx *m, h2_mplx_consumed_cb *cb, void *ctx);
 
 
-typedef apr_status_t stream_ev_callback(void *ctx, int stream_id);
+typedef apr_status_t stream_ev_callback(void *ctx, struct h2_stream *stream);
 
 /**
  * Dispatch events for the master connection, such as
@@ -339,7 +339,7 @@ typedef apr_status_t h2_mplx_req_engine_init(struct h2_req_engine *engine,
                                              const char *id, 
                                              const char *type,
                                              apr_pool_t *pool, 
-                                             apr_uint32_t req_buffer_size,
+                                             apr_size_t req_buffer_size,
                                              request_rec *r,
                                              h2_output_consumed **pconsumed,
                                              void **pbaton);
@@ -349,7 +349,7 @@ apr_status_t h2_mplx_req_engine_push(const char *ngn_type,
                                      h2_mplx_req_engine_init *einit);
 apr_status_t h2_mplx_req_engine_pull(struct h2_req_engine *ngn, 
                                      apr_read_type_e block, 
-                                     apr_uint32_t capacity, 
+                                     int capacity, 
                                      request_rec **pr);
 void h2_mplx_req_engine_done(struct h2_req_engine *ngn, conn_rec *r_conn);
 
index 8dae7b8fa5bd46631118bc91ddbcff670b842a6e..5f397d6d2628047ef16afd47109022d5d514a875 100644 (file)
@@ -79,10 +79,10 @@ struct h2_req_engine {
     unsigned int done : 1;     /* engine has finished */
 
     APR_RING_HEAD(h2_req_entries, h2_ngn_entry) entries;
-    apr_uint32_t capacity;     /* maximum concurrent requests */
-    apr_uint32_t no_assigned;  /* # of assigned requests */
-    apr_uint32_t no_live;      /* # of live */
-    apr_uint32_t no_finished;  /* # of finished */
+    int capacity;     /* maximum concurrent requests */
+    int no_assigned;  /* # of assigned requests */
+    int no_live;      /* # of live */
+    int no_finished;  /* # of finished */
     
     h2_output_consumed *out_consumed;
     void *out_consumed_ctx;
@@ -107,8 +107,8 @@ void h2_req_engine_out_consumed(h2_req_engine *engine, conn_rec *c,
 }
 
 h2_ngn_shed *h2_ngn_shed_create(apr_pool_t *pool, conn_rec *c,
-                                apr_uint32_t default_capacity, 
-                                apr_uint32_t req_buffer_size)
+                                int default_capacity, 
+                                apr_size_t req_buffer_size)
 {
     h2_ngn_shed *shed;
     
@@ -246,7 +246,7 @@ static h2_ngn_entry *pop_detached(h2_req_engine *ngn)
 
 apr_status_t h2_ngn_shed_pull_request(h2_ngn_shed *shed, 
                                       h2_req_engine *ngn, 
-                                      apr_uint32_t capacity, 
+                                      int capacity, 
                                       int want_shutdown,
                                       request_rec **pr)
 {   
index 1f61466a5c5f972a512e78cc30bb7483a35fe3c7..bcafc509b18a9ee65c1fb8b0edb6776be74d68aa 100644 (file)
@@ -28,8 +28,8 @@ struct h2_ngn_shed {
     
     unsigned int aborted : 1;
     
-    apr_uint32_t default_capacity;
-    apr_uint32_t req_buffer_size; /* preferred buffer size for responses */
+    int default_capacity;
+    apr_size_t req_buffer_size; /* preferred buffer size for responses */
 };
 
 const char *h2_req_engine_get_id(h2_req_engine *engine);
@@ -42,14 +42,14 @@ typedef apr_status_t h2_shed_ngn_init(h2_req_engine *engine,
                                       const char *id, 
                                       const char *type,
                                       apr_pool_t *pool, 
-                                      apr_uint32_t req_buffer_size,
+                                      apr_size_t req_buffer_size,
                                       request_rec *r,
                                       h2_output_consumed **pconsumed,
                                       void **pbaton);
 
 h2_ngn_shed *h2_ngn_shed_create(apr_pool_t *pool, conn_rec *c,
-                                apr_uint32_t default_capactiy, 
-                                apr_uint32_t req_buffer_size); 
+                                int default_capactiy, 
+                                apr_size_t req_buffer_size); 
 
 void h2_ngn_shed_set_ctx(h2_ngn_shed *shed, void *user_ctx);
 void *h2_ngn_shed_get_ctx(h2_ngn_shed *shed);
@@ -63,7 +63,7 @@ apr_status_t h2_ngn_shed_push_request(h2_ngn_shed *shed, const char *ngn_type,
                                       h2_shed_ngn_init *init_cb);
 
 apr_status_t h2_ngn_shed_pull_request(h2_ngn_shed *shed, h2_req_engine *pub_ngn, 
-                                      apr_uint32_t capacity, 
+                                      int capacity, 
                                       int want_shutdown, request_rec **pr);
 
 apr_status_t h2_ngn_shed_done_task(h2_ngn_shed *shed, 
index 39e139d5c8f9cb477a89a464d0215e68f71dedfe..215f8e4a4e95f98a84a2ee9aa22627a1b07dbb1d 100644 (file)
@@ -27,7 +27,7 @@
 #include "h2_proxy_util.h"
 
 /* h2_log2(n) iff n is a power of 2 */
-unsigned char h2_log2(apr_uint32_t n)
+unsigned char h2_log2(int n)
 {
     int lz = 0;
     if (!n) {
index 98f297fab4a2d0f0a6151aa1106ecf61d51cdc6c..ebf77ecbde11f4e81bf4f422fb897b2e034fc751 100644 (file)
@@ -149,7 +149,7 @@ int h2_iq_shift(h2_iqueue *q);
  * common helpers
  ******************************************************************************/
 /* h2_log2(n) iff n is a power of 2 */
-unsigned char h2_log2(apr_uint32_t n);
+unsigned char h2_log2(int n);
 
 /*******************************************************************************
  * HTTP/2 header helpers
index 042042704e9b8b192ce100fb09d055aabfe46d4f..6de93bd7d5a103b2c8785ef00f77f850aecad1b1 100644 (file)
@@ -714,9 +714,9 @@ static apr_int32_t h2_log2inv(unsigned char log2)
 typedef struct {
     h2_push_diary *diary;
     unsigned char log2p;
-    apr_uint32_t mask_bits;
-    apr_uint32_t delta_bits;
-    apr_uint32_t fixed_bits;
+    int mask_bits;
+    int delta_bits;
+    int fixed_bits;
     apr_uint64_t fixed_mask;
     apr_pool_t *pool;
     unsigned char *data;
@@ -815,7 +815,7 @@ static apr_status_t gset_encode_next(gset_encoder *encoder, apr_uint64_t pval)
  * @param plen on successful return, the length of the binary data
  */
 apr_status_t h2_push_diary_digest_get(h2_push_diary *diary, apr_pool_t *pool, 
-                                      apr_uint32_t maxP, const char *authority, 
+                                      int maxP, const char *authority, 
                                       const char **pdata, apr_size_t *plen)
 {
     apr_size_t nelts, N, i;
index bfe204f5a4c2e65c15320dcfe93cb510d7e5767f..7e85f13c6be53b02f65babadc2c9fee83e0e5c3c 100644 (file)
@@ -38,8 +38,8 @@ typedef void h2_push_digest_calc(h2_push_diary *diary, apr_uint64_t *phash, h2_p
 
 struct h2_push_diary {
     apr_array_header_t  *entries;
-    apr_uint32_t         NMax; /* Maximum for N, should size change be necessary */
-    apr_uint32_t         N;    /* Current maximum number of entries, power of 2 */
+    int         NMax; /* Maximum for N, should size change be necessary */
+    int         N;    /* Current maximum number of entries, power of 2 */
     apr_uint64_t         mask; /* mask for relevant bits */
     unsigned int         mask_bits; /* number of relevant bits */
     const char          *authority;
@@ -95,7 +95,7 @@ apr_array_header_t *h2_push_collect_update(struct h2_stream *stream,
  * @param plen on successful return, the length of the binary data
  */
 apr_status_t h2_push_diary_digest_get(h2_push_diary *diary, apr_pool_t *p, 
-                                      apr_uint32_t maxP, const char *authority, 
+                                      int maxP, const char *authority, 
                                       const char **pdata, apr_size_t *plen);
 
 /**
index a941ee0b80687fa39322f3ba71f88f162f1637d6..81f14685ffed4beab5527896659f0f972453caf1 100644 (file)
@@ -1288,7 +1288,7 @@ apr_status_t h2_session_set_prio(h2_session *session, h2_stream *stream,
     s_parent = nghttp2_stream_get_parent(s);
     if (s_parent) {
         nghttp2_priority_spec ps;
-        apr_uint32_t id_parent, id_grandpa, w_parent, w;
+        int id_parent, id_grandpa, w_parent, w;
         int rv = 0;
         char *ptype = "AFTER";
         h2_dependency dep = prio->dependency;
@@ -1546,43 +1546,41 @@ leave:
 }
 
 /**
- * A stream was resumed as new output data arrived.
+ * A stream was resumed as new response/output data arrived.
  */
-static apr_status_t on_stream_resume(void *ctx, int stream_id)
+static apr_status_t on_stream_resume(void *ctx, h2_stream *stream)
 {
     h2_session *session = ctx;
-    h2_stream *stream = get_stream(session, stream_id);
     apr_status_t status = APR_EAGAIN;
     int rv;
+    apr_off_t len = 0;
+    int eos = 0;
+    h2_headers *headers = NULL;
     
+    ap_assert(stream);
     ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c, 
-                  "h2_stream(%ld-%d): on_resume", session->id, stream_id);
-    if (stream) {
-        apr_off_t len = 0;
-        int eos = 0;
-        h2_headers *headers = NULL;
+                  "h2_stream(%ld-%d): on_resume", session->id, stream->id);
         
-        send_headers:
-        status = h2_stream_out_prepare(stream, &len, &eos, &headers);
-        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, session->c, 
-                      "h2_stream(%ld-%d): prepared len=%ld, eos=%d", 
-                      session->id, stream_id, (long)len, eos);
-        if (headers) {
-            status = on_stream_headers(session, stream, headers, len, eos);
-            if (status != APR_SUCCESS) {
-                return status;
-            }
-            goto send_headers;
-        }
-        else if (status != APR_EAGAIN) {
-            rv = nghttp2_session_resume_data(session->ngh2, stream_id);
-            session->have_written = 1;
-            ap_log_cerror(APLOG_MARK, nghttp2_is_fatal(rv)?
-                          APLOG_ERR : APLOG_DEBUG, 0, session->c,
-                          APLOGNO(02936) 
-                          "h2_stream(%ld-%d): resuming %s",
-                          session->id, stream->id, rv? nghttp2_strerror(rv) : "");
+send_headers:
+    status = h2_stream_out_prepare(stream, &len, &eos, &headers);
+    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, session->c, 
+                  "h2_stream(%ld-%d): prepared len=%ld, eos=%d", 
+                  session->id, stream->id, (long)len, eos);
+    if (headers) {
+        status = on_stream_headers(session, stream, headers, len, eos);
+        if (status != APR_SUCCESS) {
+            return status;
         }
+        goto send_headers;
+    }
+    else if (status != APR_EAGAIN) {
+        rv = nghttp2_session_resume_data(session->ngh2, stream->id);
+        session->have_written = 1;
+        ap_log_cerror(APLOG_MARK, nghttp2_is_fatal(rv)?
+                      APLOG_ERR : APLOG_DEBUG, 0, session->c,
+                      APLOGNO(02936) 
+                      "h2_stream(%ld-%d): resuming %s",
+                      session->id, stream->id, rv? nghttp2_strerror(rv) : "");
     }
     return status;
 }
index 35747710cdd1aa53ab071a875cfb4fd38f91c94e..bce39ca1fba7e7e4956bf44160589219ed6fd810 100644 (file)
@@ -192,7 +192,7 @@ static apr_status_t stream_pool_cleanup(void *ctx)
     return APR_SUCCESS;
 }
 
-h2_stream *h2_stream_open(apr_uint32_t id, apr_pool_t *pool, h2_session *session,
+h2_stream *h2_stream_open(int id, apr_pool_t *pool, h2_session *session,
                           int initiated_on)
 {
     h2_stream *stream = apr_pcalloc(pool, sizeof(h2_stream));
index 346e4e2a228fe3420d6cc0a3a742e893b8e764c6..8e772275f501c7ddda1a743a818ab27b1072ca3c 100644 (file)
@@ -42,8 +42,8 @@ struct h2_bucket_beam;
 typedef struct h2_stream h2_stream;
 
 struct h2_stream {
-    apr_uint32_t id;            /* http2 stream id */
-    apr_uint32_t initiated_on;  /* initiating stream id (PUSH) or 0 */
+    int id;            /* http2 stream id */
+    int initiated_on;  /* initiating stream id (PUSH) or 0 */
     apr_time_t created;         /* when stream was created */
     h2_stream_state_t state;    /* http/2 state of this stream */
     struct h2_session *session; /* the session this stream belongs to */
@@ -84,7 +84,7 @@ struct h2_stream {
  * @param session the session this stream belongs to
  * @return the newly opened stream
  */
-h2_stream *h2_stream_open(apr_uint32_t id, apr_pool_t *pool, struct h2_session *session,
+h2_stream *h2_stream_open(int id, apr_pool_t *pool, struct h2_session *session,
                           int initiated_on);
 
 /**
index d6f1ff23772d18d8daabc098c01f5e61bf1a3cc1..5affec3dce9d9ddbec3739f24f7558a845211a86 100644 (file)
@@ -526,7 +526,7 @@ static int h2_task_pre_conn(conn_rec* c, void *arg)
     return OK;
 }
 
-h2_task *h2_task_create(conn_rec *c, apr_uint32_t stream_id,
+h2_task *h2_task_create(conn_rec *c, int stream_id,
                         const h2_request *req, h2_bucket_beam *input, 
                         h2_mplx *mplx)
 {
index f607c88438002b66c14996f08d702740df71839e..e5c32f147e1df67fe576827faedaeb91bb9980e1 100644 (file)
@@ -50,7 +50,7 @@ typedef struct h2_task h2_task;
 
 struct h2_task {
     const char *id;
-    apr_uint32_t stream_id;
+    int stream_id;
     conn_rec *c;
     apr_pool_t *pool;
     
@@ -89,7 +89,7 @@ struct h2_task {
     struct h2_req_engine *assigned; /* engine that task has been assigned to */
 };
 
-h2_task *h2_task_create(conn_rec *c, apr_uint32_t stream_id, 
+h2_task *h2_task_create(conn_rec *c, int stream_id, 
                         const struct h2_request *req, 
                         struct h2_bucket_beam *input, struct h2_mplx *mplx);
 
index f62bc6c8b7ec5e88d68bdaacac321b08d9f5bc6a..3a3900dd09f1c91ea7caf0480dc24ceab0a5bb9a 100644 (file)
@@ -27,7 +27,7 @@
 #include "h2_util.h"
 
 /* h2_log2(n) iff n is a power of 2 */
-unsigned char h2_log2(apr_uint32_t n)
+unsigned char h2_log2(int n)
 {
     int lz = 0;
     if (!n) {
index 024c31381e67bffc29eecd9d8f1446d0fa611fef..d1abd6cce596840786604900155e19f25873321b 100644 (file)
@@ -160,7 +160,7 @@ int h2_iq_shift(h2_iqueue *q);
  * common helpers
  ******************************************************************************/
 /* h2_log2(n) iff n is a power of 2 */
-unsigned char h2_log2(apr_uint32_t n);
+unsigned char h2_log2(int n);
 
 /**
  * Count the bytes that all key/value pairs in a table have
index b7c051e22e6cf060a411313dc2f417848db82eef..e7c28655f8273417b513c1adebed9caf05cfe6c9 100644 (file)
@@ -26,7 +26,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.7.2"
+#define MOD_HTTP2_VERSION "1.7.3"
 
 /**
  * @macro
@@ -34,7 +34,7 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define MOD_HTTP2_VERSION_NUM 0x010702
+#define MOD_HTTP2_VERSION_NUM 0x010703
 
 
 #endif /* mod_h2_h2_version_h */
index 8cf6e2de69cc3522b52c7490d48b624301494afd..9495724dbc6970740b6bf132cac150f28b084218 100644 (file)
@@ -160,7 +160,7 @@ static apr_status_t http2_req_engine_push(const char *ngn_type,
 
 static apr_status_t http2_req_engine_pull(h2_req_engine *ngn, 
                                           apr_read_type_e block, 
-                                          apr_uint32_t capacity, 
+                                          int capacity, 
                                           request_rec **pr)
 {
     return h2_mplx_req_engine_pull(ngn, block, capacity, pr);
index 3073579282fba7c176d88eb269babc24fb1b9915..15cf9d0677b0125f950822781d299df77d3ddb63 100644 (file)
@@ -49,7 +49,7 @@ typedef apr_status_t http2_req_engine_init(h2_req_engine *engine,
                                            const char *id, 
                                            const char *type,
                                            apr_pool_t *pool, 
-                                           apr_uint32_t req_buffer_size,
+                                           apr_size_t req_buffer_size,
                                            request_rec *r,
                                            http2_output_consumed **pconsumed,
                                            void **pbaton);
@@ -75,8 +75,9 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t,
 /**
  * Get a new request for processing in this engine.
  * @param engine      the engine which is done processing the slave
- * @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
+ * @param block       if call should block waiting for request to come
+ * @param capacity    how many parallel requests are acceptable
+ * @param pr          the request that needs processing or NULL
  * @return APR_SUCCESS if new request was assigned
  *         APR_EAGAIN  if no new request is available
  *         APR_EOF          if engine may shut down, as no more request will be scheduled
@@ -85,7 +86,7 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t,
 APR_DECLARE_OPTIONAL_FN(apr_status_t, 
                         http2_req_engine_pull, (h2_req_engine *engine, 
                                                 apr_read_type_e block,
-                                                apr_uint32_t capacity,
+                                                int capacity,
                                                 request_rec **pr));
 APR_DECLARE_OPTIONAL_FN(void, 
                         http2_req_engine_done, (h2_req_engine *engine, 
index df1d781175731771104b025ab687b9d864093c48..2754df02e7550f8bda93cfddf50855bb4bb61259 100644 (file)
@@ -44,7 +44,7 @@ static apr_status_t (*req_engine_push)(const char *name, request_rec *r,
                                        http2_req_engine_init *einit);
 static apr_status_t (*req_engine_pull)(h2_req_engine *engine, 
                                        apr_read_type_e block, 
-                                       apr_uint32_t capacity, 
+                                       int capacity, 
                                        request_rec **pr);
 static void (*req_engine_done)(h2_req_engine *engine, conn_rec *r_conn);
                                        
@@ -63,7 +63,7 @@ typedef struct h2_proxy_ctx {
     const char *engine_id;
     const char *engine_type;
     apr_pool_t *engine_pool;    
-    apr_uint32_t req_buffer_size;
+    apr_size_t req_buffer_size;
     request_rec *next;
     apr_size_t capacity;
     
@@ -210,7 +210,7 @@ static apr_status_t proxy_engine_init(h2_req_engine *engine,
                                         const char *id, 
                                         const char *type,
                                         apr_pool_t *pool, 
-                                        apr_uint32_t req_buffer_size,
+                                        apr_size_t req_buffer_size,
                                         request_rec *r,
                                         http2_output_consumed **pconsumed,
                                         void **pctx)