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

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

fire out-sess chain

packets to active session

Definition at line 485 of file mm.c.

References mod_instance_st::mod, mod_PASS, module_st::name, mm_st::nout_sess, module_st::out_sess, and mm_st::out_sess.

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

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

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

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

    return ret;
}


Generated by  Doxygen 1.6.0   Back to index