httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevac Marko" <mke...@gmail.com>
Subject Re: Access configuration variable in other modules
Date Sat, 13 Sep 2008 11:25:42 GMT
Catch the example:

        cache_module = ap_find_linked_module("mod_cache.c");
        if (!cache_module) {
            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, ERRTAG "%s: "
                    "Can't find mod_cache module.", __func__);
            return;
        }

        conf_cache =
            (cache_server_conf *)ap_get_module_config(
                    s->module_config, cache_module);
        if (!conf_cache) {
            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, ERRTAG "%s: "
                    "Can't acquire mod_cache server configuration structure.",
                    __func__);
            return;
        }

On 9/13/08, Andrej van der Zee <andrejvanderzee@gmail.com> wrote:
> Hi,
>
>  I am writing my first Apache module for monitoring resource usage of
>  embedded interpreters and CGI applications on Linux (I am also adapting
>  mod_cgi and the apr-library). The problem is that my own module has some
>  server-level configuration options that I can initialize and use in my own
>  module, but I don't know how to access them in *another* module (i.e.
>  mod_cgi). What is the way to do this? Any examples of this in the modules
>  that come with the sources?
>
>  Cheers,
>
> Andrej
>


-- 
С уважением, Кевац Марко
Sincerely yours, Kevac Marko
Mime
View raw message