httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abitfarago Cini <ciniabitfar...@gmail.com>
Subject endless loop in my module
Date Thu, 26 Jul 2012 05:10:21 GMT
Hi,

I need in my Apache 2 module an endless loop what starts after the module
was loaded. Where should I put it?

#include <httpd.h>
#include <http_config.h>
#include <http_log.h>
#include <http_protocol.h>

static int xyz_handler(request_rec *r)
{
        if (!r->handler || strcmp(r->handler, "xyz"))
        {
                return DECLINED;
        }
        ...
        return OK;
}

static const char *set_xyz_configuration_file(
cmd_parms *parms, void *dummy,
                                               const char *url)
{
    return NULL;
}

static const command_rec xyz_cmds[] =
{
    AP_INIT_TAKE1("XyzConfigurationFile", set_xyz_configuration_file, NULL,
RSRC_CONF,
                  "The main configuration file"),
        {NULL}
};

static void register_hooks(apr_pool_t *p)
{
    ap_hook_handler(xyz_handler, NULL, NULL, APR_HOOK_MIDDLE);
}

module AP_MODULE_DECLARE_DATA glas_module =
{
    STANDARD20_MODULE_STUFF,
    NULL,                       /* dir config creater */
    NULL,                       /* dir merger --- default is to override */
    NULL,                       /* server config */
    NULL,                       /* merge server config */
    xyz_cmds,                   /* command table */
    register_hooks              /* register_hooks */
};

Thank you,
Abitfarago Cini

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