On Thu, 25 Aug 2005 17:25:34 +0400, Maxim wrote:
> Hi all!
>
> The following problem with my module:
> wherever i try to call apreq_handle_apache2, my module leads to segfault
> during request processing.
>
> FOr example, I tried to do the following thing:
>
> static int mod_tut1_fixups(request_rec *r)
> {
> fprintf(stderr, "FIXUPS");
> req_h = apreq_handle_apache2(r);
>
> return DECLINED;
> }
>
> and this lead to segfault in every request. I don't know at what stage
> of request processing, but must be very early, because I didn't see that
> "FIXUPS" message, which this hook where supposed to output.
>
Hmm, just to make shure we don't hunt ghosts here: you _did_ load
mod_apreq2 in your server configuration?
> Any example of actually using this apreq_hadle_request would be
> really-really helpful!
C++ but i guess you get the gist:
static void
parse_params(request_rec *r, ParamMap &map) {
apreq_handle_t *request;
apr_table_t *param_table;
request = apreq_handle_apache2(r);
if(!request) {
cerr << "No request!" << endl;
return;
}
param_table = apreq_params(request, r->pool);
if(!param_table){
cerr << "No parameters!" << endl;
return;
}
HTH Ralf Mattes
> Thanks in advance!