Commit a5d7c802 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

fix def'n of AP_SLOTMEM_PROVIDER_VERSION, use it


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146737 13f79535-47bb-0310-9956-ffa450edef68
parent dc225952
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ extern "C" {
#endif

#define AP_SLOTMEM_PROVIDER_GROUP "slotmem"
#define AP_SLOTMEM_PROVIDER_VERSION 0
#define AP_SLOTMEM_PROVIDER_VERSION "0"

typedef unsigned int ap_slotmem_type_t;

+2 −1
Original line number Diff line number Diff line
@@ -683,7 +683,8 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
    if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_CONFIG) {
        /* this is the real thing */
        if (maxworkers) {
            storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared", "0");
            storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
                                         AP_SLOTMEM_PROVIDER_VERSION);
            if (!storage) {
                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
                return !OK;
+2 −1
Original line number Diff line number Diff line
@@ -396,7 +396,8 @@ static int lb_hb_init(apr_pool_t *p, apr_pool_t *plog,
    if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
        return OK;

    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared", "0");
    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
                                 AP_SLOTMEM_PROVIDER_VERSION);
    if (!storage) {
        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
        return OK;
+2 −1
Original line number Diff line number Diff line
@@ -703,7 +703,8 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
    /*
     * Get slotmem setups
     */
    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared", "0");
    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
                                 AP_SLOTMEM_PROVIDER_VERSION);
    if (!storage) {
        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s,
                     "ap_lookup_provider %s failed: is mod_slotmem_shm loaded??",
+2 −1
Original line number Diff line number Diff line
@@ -300,7 +300,8 @@ static int pre_config(apr_pool_t *p, apr_pool_t *plog,
static void ap_slotmem_plain_register_hook(apr_pool_t *p)
{
    /* XXX: static const char * const prePos[] = { "mod_slotmem.c", NULL }; */
    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "plain", "0", &storage);
    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "plain",
                         AP_SLOTMEM_PROVIDER_VERSION, &storage);
    ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
}

Loading