httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <...@joe-lewis.com>
Subject Re: WELCOME to modules-dev@httpd.apache.org
Date Tue, 10 Feb 2009 23:13:45 GMT
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

Mime
View raw message