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

mod_ret_t mm_in_sess ( mm_t  mm,
sess_t  sess,
pkt_t  pkt 
)

fire in-sess chain

packets from active session

Definition at line 430 of file mm.c.

References module_st::in_sess, mm_st::in_sess, mod_instance_st::mod, mod_PASS, module_st::name, and mm_st::nin_sess.

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

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

    ret = mod_PASS;
    for(n = 0; n < mm->nin_sess; n++) {
        mi = mm->in_sess[n];
        if(mi == NULL || mi->mod->in_sess == 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_sess)(mi, sess, pkt);
        if(ret != mod_PASS)
            break;
    }

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

    return ret;
}


Generated by  Doxygen 1.6.0   Back to index