-*- coding: utf-8 -*-
Changes with Apache 2.5.1
+ *) mod_http2: removed obsolete stream detach code, no longer generating events
+ in beam shutdown on pool destroy. [Stefan Eissing]
+
*) mod_slotmem_shm: Rework SHM reuse/deletion to fix races with graceful
restarts. PR 62044. [Yann Ylavic, Jim Jagielski]
}
}
-static apr_status_t beam_cleanup(void *data)
+static apr_status_t beam_cleanup(h2_bucket_beam *beam, int from_pool)
{
- h2_bucket_beam *beam = data;
apr_status_t status = APR_SUCCESS;
int safe_send = (beam->owner == H2_BEAM_OWNER_SEND);
int safe_recv = (beam->owner == H2_BEAM_OWNER_RECV);
* Clean up receiver first, if safe, then cleanup sender, if safe.
*/
+ /* When called from pool destroy, io callbacks are disabled */
+ if (from_pool) {
+ beam->cons_io_cb = NULL;
+ }
+
/* When modify send is not safe, this means we still have multi-thread
* protection and the owner is receiving the buckets. If the sending
* side has not gone away, this means we could have dangling buckets
return status;
}
+static apr_status_t beam_pool_cleanup(void *data)
+{
+ return beam_cleanup(data, 1);
+}
+
apr_status_t h2_beam_destroy(h2_bucket_beam *beam)
{
- apr_pool_cleanup_kill(beam->pool, beam, beam_cleanup);
- return beam_cleanup(beam);
+ apr_pool_cleanup_kill(beam->pool, beam, beam_pool_cleanup);
+ return beam_cleanup(beam, 0);
}
apr_status_t h2_beam_create(h2_bucket_beam **pbeam, apr_pool_t *pool,
if (APR_SUCCESS == rv) {
rv = apr_thread_cond_create(&beam->change, pool);
if (APR_SUCCESS == rv) {
- apr_pool_pre_cleanup_register(pool, beam, beam_cleanup);
+ apr_pool_pre_cleanup_register(pool, beam, beam_pool_cleanup);
*pbeam = beam;
}
}
ap_assert(stream);
ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, stream->session->c,
H2_STRM_MSG(stream, "destroy"));
- if (stream->pool) {
- apr_pool_destroy(stream->pool);
- stream->pool = NULL;
- }
-}
-
-apr_pool_t *h2_stream_detach_pool(h2_stream *stream)
-{
- apr_pool_t *pool = stream->pool;
- stream->pool = NULL;
- return pool;
+ apr_pool_destroy(stream->pool);
}
apr_status_t h2_stream_prep_processing(h2_stream *stream)
*/
void h2_stream_cleanup(h2_stream *stream);
-/**
- * Detach the memory pool from the stream. Will prevent stream
- * destruction to take the pool with it.
- *
- * @param stream the stream to detach the pool from
- * @result the detached memory pool or NULL if stream no longer has one
- */
-apr_pool_t *h2_stream_detach_pool(h2_stream *stream);
-
/**
* Notify the stream that amount bytes have been consumed of its input
* since the last invocation of this method (delta amount).
* @macro
* Version number of the http2 module as c string
*/
-#define MOD_HTTP2_VERSION "1.10.15-DEV"
+#define MOD_HTTP2_VERSION "1.10.16-DEV"
/**
* @macro
* 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 0x010a0f
+#define MOD_HTTP2_VERSION_NUM 0x010a10
#endif /* mod_h2_h2_version_h */