mutex permission denied

2011-08-17 Thread Jason Funk
I am trying to implement an apr proc mutex in my module. When I created the mutex with APR_LOCK_DEFAULT the mutex is successfully created but I am getting Permission Denied when I try to acquire the lock. I ran apr_proc_mutex_defname to get the name of the default mutex type and it is

Re: mutex permission denied

2011-08-17 Thread Jason Funk
introducing a race condition? Jason On Wed, Aug 17, 2011 at 9:39 AM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Wed, Aug 17, 2011 at 15:20, Jason Funk jasonlf...@gmail.com wrote: I am trying to implement an apr proc mutex in my module. When I created the mutex with APR_LOCK_DEFAULT the mutex

Re: mutex permission denied

2011-08-17 Thread Jason Funk
that it is specified in the httpd.conf file, but I do not know how to get access to those variables in my module. Jason On Wed, Aug 17, 2011 at 9:49 AM, Jason Funk jasonlf...@gmail.com wrote: Hm... interesting. I'm creating the mutex in my post_config hook. It seems like the parent process

Module restarting the server

2011-08-15 Thread Jason Funk
Hello, Is it possible for a module to trigger the web server to restart itself? Jason

Re: Get filename out of a file bucket

2011-07-26 Thread Jason Funk
*)b)-fd); To this: rv = apr_file_name_get((const char **)outfn,((apr_bucket_file *)b-data)-fd); Jason On Tue, Jul 19, 2011 at 12:19 PM, Jason Funk jasonlf...@gmail.com wrote: bump ;) On Tue, Jul 12, 2011 at 2:29 PM, Jason Funk jasonlf...@gmail.com wrote: This seems like it should

Re: Finding out original request's scheme

2011-07-22 Thread Jason Funk
Then this thread is of interest to me too. :) There is always room to improve. On Fri, Jul 22, 2011 at 4:34 AM, Ignaz Birnstingl ign...@gmail.com wrote: I just check the local port: c-local_addr-port == 443 - HTTPS c-local_addr-port == 80 - HTTP It should work for most

Re: Finding out original request's scheme

2011-07-21 Thread Jason Funk
I just check the local port: c-local_addr-port == 443 - HTTPS c-local_addr-port == 80 - HTTP It should work for most implementations. On Thu, Jul 21, 2011 at 9:19 AM, Ignaz Birnstingl ign...@gmail.com wrote: 2011/7/21 Sorin Manolache sor...@gmail.com: On Thu, Jul 21, 2011 at 11:02, Ignaz

Re: Get filename out of a file bucket

2011-07-19 Thread Jason Funk
bump ;) On Tue, Jul 12, 2011 at 2:29 PM, Jason Funk jasonlf...@gmail.com wrote: This seems like it should be trival but it isn't working for me. Relevant code snippets: char * outfn; //apr_palloced later ... while ((b = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { bytes

Get filename out of a file bucket

2011-07-12 Thread Jason Funk
This seems like it should be trival but it isn't working for me. Relevant code snippets: char * outfn; //apr_palloced later ... while ((b = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { bytes=0; if(APR_BUCKET_IS_FILE(b)){ //we should handle file buckets specially

Re: Module External Configuration

2011-06-21 Thread Jason Funk
One last question about shared memory... I have my configuration now being loaded successfully into a shared memory segment.. now my problem is that someone could change the config so that the resulting structure wouldn't fit in the shared memory segment. Is it possible to in the child replace my

Module External Configuration

2011-06-20 Thread Jason Funk
Hello, The module that I am writing has an external configuration file that it parses and loads into configuration when the server loads. Before every request it checks to see if the configuration file has been updated and if it has it reloads the configuration. The configuration should be shared

Re: Module External Configuration

2011-06-20 Thread Jason Funk
or not, but it's one data point for you. Source code is here: http://mod-sflow.googlecode.com Neil On Jun 20, 2011, at 11:39 AM, Jason Funk wrote: Hello, The module that I am writing has an external configuration file that it parses and loads into configuration when the server

Re: Kill a request nicely

2011-06-14 Thread Jason Funk
wrote: On Tue, 14 Jun 2011 16:31:22 -0500 Jason Funk jasonlf...@gmail.com wrote: I am writing an output filter module that will under some circumstances want to send back an HTTP Error Code and kill the request without sending back the content. You can't set an HTTP response code when one