Get name of config file for module

2013-05-21 Thread Sean Beck
Hi all, I have written a module and now would like to log the name of the actual config file being used by the module (there will be multiple modules on the server with their own config files. I looked through https://httpd.apache.org/docs/2.4/developer/modguide.html but am still struggling to und

Re: Get name of config file for module

2013-05-21 Thread Sean Beck
Does Apache just read out of httpd.conf on start-up and in httpd.conf I would use the Include directive to include my different configurations for each module? Thanks On Tue, May 21, 2013 at 2:32 PM, Sorin Manolache wrote: > On 2013-05-21 21:36, Sean Beck wrote: > >> Hi all, >&

Re: Get name of config file for module

2013-05-23 Thread Sean Beck
-05-21 23:52, Sean Beck wrote: > >> Sorin, >> >> Is there a way to figure out the name of the config file in code so I can >> log it? Or even just the path to where it is. >> >> Also, I'm confused because you said there is no such thing as a >>

Re: Get name of config file for module

2013-05-23 Thread Sean Beck
AM, Eric Covener wrote: > On Thu, May 23, 2013 at 10:39 AM, Sean Beck > wrote: > > OK thank you! I ask because my boss wants me to log the config file info > on > > start-up of the server but I have been completely unable to find a way to > > do so, hence why I came to

Re: Get name of config file for module

2013-05-23 Thread Sean Beck
What does cmd refer to/can I find it in the request_rec? On Thu, May 23, 2013 at 10:21 AM, Eric Covener wrote: > On Thu, May 23, 2013 at 11:44 AM, Sean Beck > wrote: > > s is the server_rec? So what you're saying is s->defn_name refers to the > > .conf the mo

Tear down of module on server stop

2013-06-06 Thread Sean Beck
Where does the tear down happen when httpd is stopped? I have some code for sending messages to ActiveMQ in my module and I would like to only make a connection on startup rather than every time someone connects, but then I need to destroy the connection when the server stops. Also, register_hooks

Re: Tear down of module on server stop

2013-06-06 Thread Sean Beck
Would I register the pool clean up function in the module struct? On Thu, Jun 6, 2013 at 3:16 PM, Joe Lewis wrote: > On 06/06/2013 03:14 PM, Sean Beck wrote: > >> Where does the tear down happen when httpd is stopped? I have some code >> for >> sending messages to Act

Re: Tear down of module on server stop

2013-06-06 Thread Sean Beck
So in the post_config hook I set up the connections then register a clean up function to terminate the connections? On Thu, Jun 6, 2013 at 4:11 PM, Joe Lewis wrote: > On 06/06/2013 03:27 PM, Sean Beck wrote: > >> Would I register the pool clean up function in the module struct? >

Re: Tear down of module on server stop

2013-06-06 Thread Sean Beck
I am unable to find in the httpd headers anything about ap_hook_post_config but I see it in examples online. Where can I look so that I understand what each of the parameters are? Also, thank you for helping me On Thu, Jun 6, 2013 at 4:16 PM, Joe Lewis wrote: > > On 06/06/2013 04:13 PM

Re: Tear down of module on server stop

2013-06-07 Thread Sean Beck
before any content-handler. That makes it seem like this is called every time a connection is made. That isn't what I want. I want to do set up only once for as long as the server is running. Would pre_config() be more suitable for that? Thanks On Thu, Jun 6, 2013 at 4:27 PM, Sean Beck wrote

Re: Tear down of module on server stop

2013-06-07 Thread Sean Beck
You guys are awesome. So it should only run once then? Also for tear down of the stuff is there a different hook that I could load? On Fri, Jun 7, 2013 at 8:53 AM, Eric Covener wrote: > > * Run the post_config function for each module > > * @param pconf The config pool > > * @param plog The

Re: Tear down of module on server stop

2013-06-07 Thread Sean Beck
OK good to know. Would I use apr_pool_cleanup_register in register hooks? On Fri, Jun 7, 2013 at 9:08 AM, Joe Lewis wrote: > > On 06/07/2013 08:59 AM, Sean Beck wrote: > >> You guys are awesome. >> So it should only run once then? Also for tear down of the stuff is th

Re: Tear down of module on server stop

2013-06-07 Thread Sean Beck
Should I give it ptemp as the pool? Or should I create a new one in post_config()? On Fri, Jun 7, 2013 at 9:14 AM, Joe Lewis wrote: > On 06/07/2013 09:09 AM, Sean Beck wrote: > >> OK good to know. >> >> Would I use apr_pool_cleanup_register in register hooks? >> &

Re: Tear down of module on server stop

2013-06-07 Thread Sean Beck
Currently when I create the connections I don't use a pool for anything. I'm using the fusemq-c library. I did notice that libstomp uses a pool though. On Fri, Jun 7, 2013 at 9:26 AM, Joe Lewis wrote: > On 06/07/2013 09:23 AM, Sean Beck wrote: > >> Should I give it ptemp

Re: Tear down of module on server stop

2013-06-07 Thread Sean Beck
pools correctly, pools are destroyed/cleaned up when the server shuts down. On Fri, Jun 7, 2013 at 9:46 AM, Joe Lewis wrote: > > On 06/07/2013 09:29 AM, Sean Beck wrote: > >> Currently when I create the connections I don't use a pool for anything. >> I'm using th

Re: Tear down of module on server stop

2013-06-07 Thread Sean Beck
Got it. I'll use the pconf one. Thanks for the help Joe! On Fri, Jun 7, 2013 at 9:59 AM, Joe Lewis wrote: > > On 06/07/2013 09:52 AM, Sean Beck wrote: > >> All I really need a pool for is so I have something to pass as a >> parameter. >> >> I see here