httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hracek, Petr" <petr.hra...@siemens.com>
Subject Building own module
Date Wed, 08 Oct 2008 07:50:56 GMT
Hello *,
 
sorry for this question but I could not find any solution for my problem on Internet (especially
on google).
 
On the our project we are using till now apache-1.3.X version.
 
Unfortunatelly now we have to use the newest version of apache-2.2.X which is included in
SLES10 distribution
and therefore we have to also upgrade our module.
 
My problem is that we used in apache-1.3 functions ap_ctx_get and ap_global_ctx:
void udsc_config_global_create(void)
{
    apr_pool_t *pPool;
    UDSCModConfigRec *mc;
 
    mc = ap_ctx_get(ap_global_ctx, "unity_module");
    if (mc == NULL) {
    /*
     * allocate an own subpool which survives server restarts
     */
    pPool = ap_make_sub_pool(NULL);
    mc = (UDSCModConfigRec *) ap_palloc(pPool, sizeof(UDSCModConfigRec));
    mc->pPool = pPool;
    mc->bFixed = FALSE;
 
    /*
     * initialize per-module configuration
     */
    mc->nInitCount = 0;
    mc->szSessionCacheDataFile = NULL;
    mc->nSessionCacheDataSize = 0;
    mc->pSessionCacheDataMM = NULL;
    mc->tSessionCacheDataTable = NULL;
    mc->nMutexMode = SECM_MUTEXMODE_UNSET;
    mc->szMutexFile = NULL;
    mc->nMutexFD = -1;
    mc->nMutexSEMID = -1;
 
    mc->szUsmwHost = NULL;
    mc->usmw_ip = (struct in_addr *) ap_palloc(pPool,sizeof(struct in_addr));
    ap_ctx_set(ap_global_ctx, "unity_module", mc);
    }
    return;
}

This procude has been called in main apache module:
module MODULE_VAR_EXPORT unity_module = {
    STANDARD_MODULE_STUFF,
 
    /* Standard API (always present) */
 
    udsc_init_Module,       /* module initializer                  */
    NULL,           /* create per-dir    config structures */
    NULL,           /* merge  per-dir    config structures */
    udsc_config_global_create,  /* create per-server config structures */
    NULL,   /* merge  per-server config structures */
    udsc_config_cmds,       /* table of config file commands       */
    udsc_handlers,      /* [#8] MIME-typed-dispatched handlers */
    NULL,           /* udsc_translation_handler [#1] URI to filename translation    */
    udsc_auth_handler,      /* [#4] validate user id from request  */
    udsc_access_handler,    /* [#5] check if the user is ok _here_ */
    NULL,           /* [#3] check access by host address   */
    NULL,           /* [#6] determine MIME type            */
    udsc_fixups,    /* [#7] pre-run fixups                 */
    NULL,           /* [#9] log a transaction              */
    NULL,           /* [#2] header parser                  */
    udsc_init_Child,    /* child_init                          */
    udsc_child_exit,    /* child_exit                          */
    NULL,           /* [#0] post read-request              */
 
 
 
My question is if we used ap_ctx_get functions for getting contents as is written in ap_ctx.h
 
how it should be written for apache-2.2.X?
What are equivalents for ap_ctx_get and ap_global_ctx functions?
 
regards / S pozdravem
 
Ing. Petr Hráček
IT Services and Enterprise Communications
Developer
 
Bidláky 20, budova Mediahall
639 00 Brno
 
Tel.:  +420 533 337 267
Fax.: +420 533 337 252
mailto: petr.hracek@siemens.com <mailto:petr.hracek@siemens.com> 
www.isec-it.com <http://www.isec-it.com/> 
 
Společnost: iSEC - IT Services and Enterprise Communications s.r.o.
Sídlo: Brno, Bidláky 20, 639 00
Obchodní firma je zapsána v obchodním rejstříku u Krajského soudu v Brně v oddílu
C, ve složce 54602. 
IČ: 27721710
 
POZOR!

Tento e-mail může obsahovat obchodní tajemství nebo jiné utajované a důvěrné informace.
Pokud jste tento e-mail obdrželi omylem, oznamujeme Vám tímto, že je přísně zakázáno
jej jakýmkoli způsobem upravovat, kopírovat nebo šířit. Neprodleně nás prosím informujte
a tento e-mail zničte. Děkujeme za spolupráci.

 

Important Note!

This e-mail  may contain trade secrets or privileged, undisclosed or otherwise confidential
information. If you have received this e-mail in error, you are hereby notified that any review,
copying or distribution of it is strictly prohibited. Please inform us immediately and destroy
the original transmittal. Thank you for your cooperation.

 
 

Mime
View raw message