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

mod_ret_t mm_pkt_user ( mm_t  mm,
user_t  user,
pkt_t  pkt 
)

fire pkt-user chain

packets for user

Definition at line 565 of file mm.c.

References mod_instance_st::mod, mod_PASS, module_st::name, mm_st::npkt_user, module_st::pkt_user, and mm_st::pkt_user.

Referenced by dispatch().

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

    log_debug(ZONE, "dispatching pkt-user chain");

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

    log_debug(ZONE, "pkt-user chain returning %d", ret);

    return ret;
}


Generated by  Doxygen 1.6.0   Back to index