Ignore:
Timestamp:
Aug 6, 2013 8:02:24 AM (11 years ago)
Author:
bennylp
Message:

Fixed #1693: Pay attention to reg_hdr_list and sub_hdr_list in pjsua_acc_modify(), and also fixed pjsua_acc_get_config()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r4525 r4580  
    12801280    pjsua_transport_config tcp_cfg; 
    12811281    unsigned i; 
     1282    pj_pool_t *tmp_pool; 
    12821283    pj_status_t status; 
    12831284 
     
    12891290    /* Create pool for application */ 
    12901291    app_config.pool = pjsua_pool_create("pjsua-app", 1000, 1000); 
     1292    tmp_pool = pjsua_pool_create("tmp-pjsua", 1000, 1000);; 
    12911293 
    12921294    /* Init CLI & its FE settings */ 
     
    13001302    /** Parse args **/ 
    13011303    status = load_config(app_cfg.argc, app_cfg.argv, &uri_arg); 
    1302     if (status != PJ_SUCCESS) 
     1304    if (status != PJ_SUCCESS) { 
     1305        pj_pool_release(tmp_pool); 
    13031306        return status; 
     1307    } 
    13041308 
    13051309    /* Initialize application callbacks */ 
     
    13401344    status = pjsua_init(&app_config.cfg, &app_config.log_cfg, 
    13411345                        &app_config.media_cfg); 
    1342     if (status != PJ_SUCCESS) 
     1346    if (status != PJ_SUCCESS) { 
     1347        pj_pool_release(tmp_pool); 
    13431348        return status; 
     1349    } 
    13441350 
    13451351    /* Initialize our module to handle otherwise unhandled request */ 
     
    15881594        if (PJMEDIA_HAS_VIDEO) { 
    15891595            pjsua_acc_config acc_cfg; 
    1590             pjsua_acc_get_config(aid, &acc_cfg); 
     1596            pjsua_acc_get_config(aid, tmp_pool, &acc_cfg); 
    15911597            app_config_init_video(&acc_cfg); 
    15921598            pjsua_acc_modify(aid, &acc_cfg); 
     
    16271633        if (PJMEDIA_HAS_VIDEO) { 
    16281634            pjsua_acc_config acc_cfg; 
    1629             pjsua_acc_get_config(aid, &acc_cfg); 
     1635            pjsua_acc_get_config(aid, tmp_pool, &acc_cfg); 
    16301636            app_config_init_video(&acc_cfg); 
    16311637            if (app_config.ipv6) 
     
    16611667        if (PJMEDIA_HAS_VIDEO) { 
    16621668            pjsua_acc_config acc_cfg; 
    1663             pjsua_acc_get_config(aid, &acc_cfg); 
     1669            pjsua_acc_get_config(aid, tmp_pool, &acc_cfg); 
    16641670            app_config_init_video(&acc_cfg); 
    16651671            pjsua_acc_modify(aid, &acc_cfg); 
     
    16861692        if (PJMEDIA_HAS_VIDEO) { 
    16871693            pjsua_acc_config acc_cfg; 
    1688             pjsua_acc_get_config(aid, &acc_cfg); 
     1694            pjsua_acc_get_config(aid, tmp_pool, &acc_cfg); 
    16891695            app_config_init_video(&acc_cfg); 
    16901696            if (app_config.ipv6) 
     
    17211727        if (PJMEDIA_HAS_VIDEO) { 
    17221728            pjsua_acc_config acc_cfg; 
    1723             pjsua_acc_get_config(acc_id, &acc_cfg); 
     1729            pjsua_acc_get_config(acc_id, tmp_pool, &acc_cfg); 
    17241730            app_config_init_video(&acc_cfg); 
    17251731            pjsua_acc_modify(acc_id, &acc_cfg); 
     
    17451751        if (PJMEDIA_HAS_VIDEO) { 
    17461752            pjsua_acc_config acc_cfg; 
    1747             pjsua_acc_get_config(aid, &acc_cfg); 
     1753            pjsua_acc_get_config(aid, tmp_pool, &acc_cfg); 
    17481754            app_config_init_video(&acc_cfg); 
    17491755            if (app_config.ipv6) 
     
    18301836    call_opt.vid_cnt = app_config.vid.vid_cnt; 
    18311837 
     1838    pj_pool_release(tmp_pool); 
    18321839    return PJ_SUCCESS; 
    18331840 
    18341841on_error: 
     1842    pj_pool_release(tmp_pool); 
    18351843    app_destroy(); 
    18361844    return status; 
Note: See TracChangeset for help on using the changeset viewer.