httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thib <>
Subject Handler method is it executed in mutex?
Date Fri, 04 Apr 2008 07:04:50 GMT

I'm developping an Apache Module, and I ask me a question about the
execution of the handler.

Do you know if the handler is executed in mutex (mutual exclusion) ?

In fact, I used some global variables in my configuration structure and in
the handler the program read and write on these variables (I did that to
avoid to allocate memory during the treatment of the request) But now, I'm
afraid to have a big bug...

For example, my global structure :

typedef struct {
        char    *liste_traducteurs;
        char    **tab_liste_traducteurs;
        int     nb_tab_liste_traducteurs;
        regex_t regNumber;
        struct  ns2__EnMessageReq eni;
        struct  ns2__queryResponse result;
        struct  soap
        general_trap_config general_trap_config;
} snu_config;

In the method create_snu_config, I allocate the memory :

        // Allocation de la mémoire pour la structure eni
        newcfg->eni.calling = (char *) apr_pcalloc(p, TAILLE_CHAMPS *
        newcfg->eni.location = (char *) apr_pcalloc(p, TAILLE_CHAMPS *
        newcfg->eni.called = (char *) apr_pcalloc(p, TAILLE_CHAMPS *

And in the handler I read/write variables :


Thanks a lot for your help ;)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message