Logo Search packages:      
Sourcecode: jabberd2 version File versions  Download package

mod_ret_t mm_in_router ( mm_t  mm,
pkt_t  pkt 
)

fire in-router chain

packets from router

Definition at line 458 of file mm.c.

References module_st::in_router, mm_st::in_router, mod_instance_st::mod, mod_PASS, module_st::name, and mm_st::nin_router.

Referenced by dispatch().

                                           {
    int n;
    mod_instance_t mi;
    mod_ret_t ret = mod_PASS;

    log_debug(ZONE, "dispatching in-router chain");

    for(n = 0; n < mm->nin_router; n++) {
        mi = mm->in_router[n];
        if(mi == NULL || mi->mod->in_router == NULL) {
            log_debug(ZONE, "module %s has no handler for this chain", mi->mod->name);
            continue;
        }

        log_debug(ZONE, "calling module %s", mi->mod->name);

        ret = (mi->mod->in_router)(mi, pkt);
        if(ret != mod_PASS)
            break;
    }

    log_debug(ZONE, "in-router chain returning %d", ret);

    return ret;
}


Generated by  Doxygen 1.6.0   Back to index