dave wrote:
Hi All,

I'm having trouble with the server_rec->module_config variable and perhaps I
am misunderstanding something.

static void get_resource(void *module_config) {
    my_config *cfg = (my_config *)ap_get_module_config(module_config,
&my_module);
    printf("module_config: %d\n", cfg);

    //...
}


static int my_child_init(apr_pool_t *p, server_rec *s) {
    printf("init server_config: %d\n", s->module_config);
    get_resource(s->module_config);
    //...
}

static int my_handler(request_rec *r){
    //...
    printf("request server_config: %d\n", r->server->module_config);
    get_resource(r->server->module_config);
    //...
}



So, how is the s->module_config being set? I hope you are creating it in the per-server config create function. Do you have that code for us to look at?

Joe

Reply via email to