Commit 007eed5b authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Add new ap_reserve_module_slots/ap_reserve_module_slots_directive API,

necessary if a module (like mod_perl) registers additional modules later than the
EXEC_ON_READ phase.

Tested by: Torsten Foertsch <torsten foertsch gmx net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096569 13f79535-47bb-0310-9956-ffa450edef68
parent 69c9ff22
Loading
Loading
Loading
Loading
+4 −0
Changes for CHANGES: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,10 @@

Changes with Apache 2.3.12

  *) Add new ap_reserve_module_slots/ap_reserve_module_slots_directive API,
     necessary if a module (like mod_perl) registers additional modules late
     in the startup phase. [Stefan Fritsch]

  *) core: Prevent segfault if DYNAMIC_MODULE_LIMIT is reached. PR 51072.
     [Torsten Förtsch <torsten foertsch gmx net>]

+5 −1
Changes for docs/manual/developer/new_api_2_4.xml: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -130,7 +130,11 @@
      <li>Support for mod_request kept_body</li>
      <li>Support buffering filter data for async requests</li>
      <li>New CONN_STATE values</li>
      <li>Function changes: ap_escape_html updated; ap_unescape_all, ap_escape_path_segment_buffer</li>
      <li>Function changes: ap_escape_html updated; ap_unescape_all,
          ap_escape_path_segment_buffer</li>
      <li>Modules that load other modules later than the EXEC_ON_READ config
          reading stage need to call ap_reserve_module_slots() or
          ap_reserve_module_slots_directive() in their pre_config hook.</li>
    </ul>
  </section>

+4 −1
Changes for include/ap_mmn.h: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -316,6 +316,9 @@
 *                         Axe mpm_note_child_killed hook, change
 *                         ap_reclaim_child_process and ap_recover_child_process
 *                         interfaces.
 * 20110329.1 (2.3.12-dev) Add ap_reserve_module_slots()/ap_reserve_module_slots_directive()
 *                         change AP_CORE_DECLARE to AP_DECLARE: ap_create_request_config()
 *                         change AP_DECLARE to AP_CORE_DECLARE: ap_register_log_hooks()
 */

#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
@@ -323,7 +326,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20110329
#endif
#define MODULE_MAGIC_NUMBER_MINOR 0                    /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 1                    /* 0...n */

/**
 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
+18 −1
Changes for include/http_config.h: 18 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -988,6 +988,23 @@ AP_DECLARE(void) ap_register_hooks(module *m, apr_pool_t *p);
AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p,
                                        server_rec *main_server);

/**
 * Reserve some modules slots for modules loaded by other means than
 * EXEC_ON_READ directives.
 * Relevant modules should call this in the pre_config stage.
 * @param count The number of slots to reserve.
 */
AP_DECLARE(void) ap_reserve_module_slots(int count);

/**
 * Reserve some modules slots for modules loaded by a specific
 * non-EXEC_ON_READ config directive.
 * This counts how often the given directive is used in the config and calls
 * ap_reserve_module_slots() accordingly.
 * @param directive The name of the directive
 */
AP_DECLARE(void) ap_reserve_module_slots_directive(const char *directive);

/* For http_request.c... */

/**
@@ -995,7 +1012,7 @@ AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p,
 * @param p The pool to allocate the config vector from
 * @return The config vector
 */
AP_CORE_DECLARE(ap_conf_vector_t*) ap_create_request_config(apr_pool_t *p);
AP_DECLARE(ap_conf_vector_t*) ap_create_request_config(apr_pool_t *p);

/**
 * Setup the config vector for per dir module configs
+2 −1
Changes for include/http_core.h: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -766,7 +766,8 @@ typedef struct {
    unsigned int min_loglevel;
} ap_errorlog_format_item;

AP_DECLARE(void) ap_register_log_hooks(apr_pool_t *p);
AP_CORE_DECLARE(void) ap_register_log_hooks(apr_pool_t *p);
AP_CORE_DECLARE(void) ap_register_config_hooks(apr_pool_t *p);

/* ----------------------------------------------------------------------
 *
Loading