const char *name = f->frec->name;
const char *fname = f->frec->name;
static int modperl_filter_register_request(request_rec *r,                                           int idx,                                           const char *name,                                           filter_add_t addfunc,                                           const char *type,                                           ap_filter_t *filters){    MP_dDCFG;    MpAV *av;    if ((av = dcfg->handlers_per_dir[idx])) {        modperl_handler_t **handlers = (modperl_handler_t **)av->elts;        int i;        for (i=0; i<av->nelts; i++) {            modperl_filter_ctx_t *ctx;            int registered = 0;            ap_filter_t *f = filters;            while (f) {                const char *name = f->frec->name;                if (*name == 'M' && strEQ(name, name)) {                    modperl_handler_t *ctx_handler =                         ((modperl_filter_ctx_t *)f->ctx)->handler;                    if (modperl_handler_equal(ctx_handler, handlers[i])) {                        /* skip if modperl_filter_register_connection                         * already registered this handler                         * XXX: set a flag in the modperl_handler_t instead                         */                        registered = 1;                        break;                    }                }                f = f->next;            }            if (registered) {                MP_TRACE_f(MP_FUNC,                        "%s %s already registered\n",                        handlers[i]->name, type);                continue;            }            ctx = (modperl_filter_ctx_t *)apr_pcalloc(r->pool, sizeof(*ctx));            ctx->handler = handlers[i];            addfunc(name, (void*)ctx, r, NULL);        }        return OK;    }    MP_TRACE_h(MP_FUNC, "no %s handlers configured (%s)\n",               type, r->uri);    return DECLINED;}