Esempio n. 1
0
File: ccurl.c Progetto: inevity/ebgn
/**
*
* initialize mod mgr of CCURL module
*
**/
UINT32 ccurl_set_mod_mgr(const UINT32 ccurl_md_id, const MOD_MGR * src_mod_mgr)
{
    CCURL_MD *ccurl_md;
    MOD_MGR  *des_mod_mgr;

#if ( SWITCH_ON == CCURL_DEBUG_SWITCH )
    if ( CCURL_MD_ID_CHECK_INVALID(ccurl_md_id) )
    {
        sys_log(LOGSTDOUT,
                "error:ccurl_set_mod_mgr: ccurl module #0x%lx not started.\n",
                ccurl_md_id);
        ccurl_print_module_status(ccurl_md_id, LOGSTDOUT);
        dbg_exit(MD_CCURL, ccurl_md_id);
    }
#endif/*CCURL_DEBUG_SWITCH*/

    ccurl_md = CCURL_MD_GET(ccurl_md_id);
    des_mod_mgr = CCURL_MD_MOD_MGR(ccurl_md);

    dbg_log(SEC_0030_CCURL, 5)(LOGSTDOUT, "ccurl_set_mod_mgr: md_id %d, input src_mod_mgr %lx\n", ccurl_md_id, src_mod_mgr);
    mod_mgr_print(LOGSTDOUT, src_mod_mgr);

    /*figure out mod_nodes with tcid belong to set of ccurlnp_tcid_vec and ccurlnp_tcid_vec*/
    mod_mgr_limited_clone(ccurl_md_id, src_mod_mgr, des_mod_mgr);

    dbg_log(SEC_0030_CCURL, 5)(LOGSTDOUT, "====================================ccurl_set_mod_mgr: des_mod_mgr %lx beg====================================\n", des_mod_mgr);
    mod_mgr_print(LOGSTDOUT, des_mod_mgr);
    dbg_log(SEC_0030_CCURL, 5)(LOGSTDOUT, "====================================ccurl_set_mod_mgr: des_mod_mgr %lx end====================================\n", des_mod_mgr);

    return (0);
}
Esempio n. 2
0
/**
*
* initialize mod mgr of VMATRIXR module
*
**/
UINT32 vmatrix_r_set_mod_mgr(const UINT32 vmatrixr_md_id, const MOD_MGR * src_mod_mgr)
{
    VMATRIXR_MD *vmatrixr_md;
    MOD_MGR * des_mod_mgr;

#if ( SWITCH_ON == MATRIX_DEBUG_SWITCH )
    if ( VMATRIXR_MD_ID_CHECK_INVALID(vmatrixr_md_id) )
    {
        sys_log(LOGSTDOUT,
                "error:vmatrix_r_set_mod_mgr: matrixr module #0x%lx not started.\n",
                vmatrixr_md_id);
        vmatrix_r_print_module_status(vmatrixr_md_id, LOGSTDOUT);
        dbg_exit(MD_VMATRIXR, vmatrixr_md_id);
    }
#endif/*MATRIX_DEBUG_SWITCH*/

    vmatrixr_md = VMATRIXR_MD_GET(vmatrixr_md_id);
    des_mod_mgr = vmatrixr_md->mod_mgr;

    //sys_log(LOGSTDOUT, "vmatrix_r_set_mod_mgr: md_id %d, src_mod_mgr %lx\n", vmatrixr_md_id, src_mod_mgr);
    //mod_mgr_print(LOGSTDOUT, src_mod_mgr);

    mod_mgr_limited_clone(vmatrixr_md_id, src_mod_mgr, des_mod_mgr);

    //sys_log(LOGSTDOUT, "vmatrix_r_set_mod_mgr: md_id %d, des_mod_mgr %lx\n", vmatrixr_md_id, des_mod_mgr);
    //mod_mgr_print(LOGSTDOUT, des_mod_mgr);

    sys_log(LOGSTDOUT, "====================================vmatrix_r_set_mod_mgr: des_mod_mgr %lx beg====================================\n", des_mod_mgr);
    mod_mgr_print(LOGSTDOUT, des_mod_mgr);
    sys_log(LOGSTDOUT, "====================================vmatrix_r_set_mod_mgr: des_mod_mgr %lx end====================================\n", des_mod_mgr);


    return (0);
}