* 20090401.1 (2.3.3-dev) Protected log.c internals, http_log.h changes
* 20090401.2 (2.3.3-dev) Added tmp_flush_bb to core_output_filter_ctx_t
* 20090401.3 (2.3.3-dev) Added DAV options provider to mod_dav.h
+ * 20090925.0 (2.3.3-dev) Added server_rec::context and added *server_rec
+ * param to ap_wait_or_timeout()
*
*/
/** The server request scheme for redirect responses */
const char *server_scheme;
+
+ /** Opaque storage location */
+ void *context;
};
typedef struct core_output_filter_ctx {
* @param status The return code if a process has died
* @param ret The process id of the process that died
* @param p The pool to allocate out of
+ * @param s The server_rec to pass
*/
void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
- apr_pool_t *p);
+ apr_pool_t *p, server_rec *s);
/**
* Log why a child died to the error log, if the child died without the
*
* This is a RUN_ALL hook.
*/
-static int x_monitor(apr_pool_t *p)
+static int x_monitor(apr_pool_t *p, server_rec *s)
{
trace_nocontext(p, __FILE__, __LINE__, "x_monitor()");
return DECLINED;
return DECLINED;
}
-static int noloris_monitor(apr_pool_t *pool)
+static int noloris_monitor(apr_pool_t *pool, server_rec *s)
{
static apr_hash_t *connections = NULL;
static apr_time_t last_check = 0;
* The monitor hook doesn't help us that much, as we have no handle into the
* server, and so we need to come up with a way to do this safely.
*/
-static apr_status_t dbd_clean(apr_pool_t *p)
+static apr_status_t dbd_clean(apr_pool_t *p, server_rec *s)
{
return APR_ENOTIMPL;
* This function performs housekeeping on the database, deleting expired
* sessions.
*/
-static int session_dbd_monitor(apr_pool_t *p)
+static int session_dbd_monitor(apr_pool_t *p, server_rec *s)
{
/* TODO handle housekeeping */
- dbd_clean(p);
+ dbd_clean(p, s);
return OK;
}
int i;
while (!restart_pending && !shutdown_pending) {
- ap_wait_or_timeout(&exitwhy, &status, &pid, pconf);
+ ap_wait_or_timeout(&exitwhy, &status, &pid, pconf, ap_server_conf);
if (pid.pid != -1) {
processed_status = ap_process_child_status(&pid, exitwhy, status);
/* this is a memory leak, but I'll fix it later. */
apr_proc_t pid;
- ap_wait_or_timeout(&exitwhy, &status, &pid, pconf);
+ ap_wait_or_timeout(&exitwhy, &status, &pid, pconf, ap_server_conf);
/* XXX: if it takes longer than 1 second for all our children
* to start up and get into IDLE state then we may spawn an
int i;
while (!restart_pending && !shutdown_pending) {
- ap_wait_or_timeout(&exitwhy, &status, &pid, pconf);
+ ap_wait_or_timeout(&exitwhy, &status, &pid, pconf, ap_server_conf);
if (pid.pid != -1) {
processed_status = ap_process_child_status(&pid, exitwhy, status);
static int wait_or_timeout_counter;
void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
- apr_pool_t *p)
+ apr_pool_t *p, server_rec *s)
{
apr_status_t rv;
++wait_or_timeout_counter;
if (wait_or_timeout_counter == INTERVAL_OF_WRITABLE_PROBES) {
wait_or_timeout_counter = 0;
- ap_run_monitor(p);
+ ap_run_monitor(p, s);
}
rv = apr_proc_wait_all_procs(ret, exitcode, status, APR_NOWAIT, p);