Re: Can't access module config from handler function

2011-08-17 Thread Simone Caruso
On 17/08/2011 09:10, Zaid Amireh wrote: On Aug 15, 2011, at 1:45 PM, Simone Caruso wrote: On 15/08/2011 01:44, Nick Kew wrote: or set up something server-wide How? there's some code that can i read? You can use a global variable which gets set during apache's startup, you have

Re: Can't access module config from handler function

2011-08-14 Thread Simone Caruso
Using it in a Location would suggest it's per_dir config. I setup the shm in post_config hook: ap_hook_post_config(post_config_hook, NULL, NULL, APR_HOOK_REALLY_FIRST); ... but per_dir config for your location doesn't exist at post_config time! Now im sure this is not a problem related

Re: Can't access module config from handler function

2011-08-13 Thread Simone Caruso
because the config it sees hasn't been merged for the location The config is a server based confing not a per-dir one. I suspect you're using the wrong configuration hierarchy for the job at hand. Im attacking shm segmets in post_confing hook, i can see the address in 'traslate' but not in

Re: Add a variable on http header

2011-06-06 Thread Simone Caruso
. Changing,in line 22, from 'headers_in' to 'headers_out' make your module work in my test env only for non-html content. Of course i set SetHandler getadsldap in my conf. -- Simone Caruso IT Consultant +39 349 65 90 805 p.iva: 03045250838

module interaction

2011-03-26 Thread Simone Caruso
I have made 2 modules for different scopes, now i would like let them comunicate, there is an interface that permits me do this without using files ? Being loaded together can i call module2's functions from module1 and vice versa? -- Simone Caruso IT Consultant

Re: Help with apr mutex

2011-03-01 Thread Simone Caruso
in 2.3.0. Might save you some work. :) I read trunk/modules/cache/mod_socache_shmcb.c too, looks very interesting! Surely I will rewrite my module for 2.3 using socache, thank you Ben. -- Simone Caruso p.iva: 03045250838

Re: Help with apr mutex

2011-02-28 Thread Simone Caruso
, mymod.lck); result = apr_global_mutex_create(mtx, lock, APR_LOCK_DEFAULT, p); if(result != APR_SUCCESS) ... } apr_global_mutex_create returns APR_SUCCESS, but apr_global_mutex_lock returns Permission denied, maybe the lock is created wrong permissions ?? -- Simone Caruso

Re: Help with apr mutex

2011-02-28 Thread Simone Caruso
the lock() just after the trylock() call. regards, thomas Thanks Thoms, i'm going to try your code! -- Simone Caruso IT Consultant +39 349 65 90 805 p.iva: 03045250838

I don't understand apr_array_push

2011-01-26 Thread Simone Caruso
. 0x7fc350e6784f in alias_matches (uri=0x94f820 /, alias_fakename=0xda0094ff Address 0xda0094ff out of bounds) I tried a for like this without success (like mod_alias.c): for(k = 0; k reqc-aliases-nelts -1 ; ++k){ Any idea? thanks! -- Simone Caruso IT Consultant +39 349 65 90

Re: I don't understand apr_array_push

2011-01-26 Thread Simone Caruso
On 26/01/2011 16:28, Simone Caruso wrote: Hi list, i can't understand the reason i can't read from an apr array, my code is like this: //The 2 arrays, now working on reqc-aliases reqc-aliases = (apr_array_header_t *)apr_array_make(r-pool, 5, sizeof(alias_t)); reqc-redirects