On Wed, 23 Jun 2004 10:31:08 -0400, Brian Akins wrote: > How do I register a mod_status hook. Looking at the code, I figure I > register a hook using "ap_hook_status_hook" (if I try anything else, I > get a complier warning). However I get "undefined symbol: > ap_hook_status_hook" when I try to run. > > Obviously, I'm missing something... Make sure you are including mod_status.h in your module source. And this is an optional hook so you should declare the hook like this.
int my_status_hook(request_rec *r, int flags) { return OK; } APR_OPTIONAL_HOOK(status_hook,my_status_hook, NULL,NULL,APR_HOOK_MIDDLE); and you need to make sure that mod_status is loaded before your module, otherwise the hook won't get enabled.