Changeset 4525 for pjproject


Ignore:
Timestamp:
May 28, 2013 12:03:36 PM (11 years ago)
Author:
riza
Message:

Re #1643: Restore configuration reset with added modification on app destroy. It was deleted from code to enable cli retain config values when restarted

Location:
pjproject/trunk/pjsip-apps/src/pjsua
Files:
2 edited

Legend:

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

    r4489 r4525  
    19131913    pj_status_t status = PJ_SUCCESS; 
    19141914    unsigned i; 
     1915    pj_bool_t use_cli = PJ_FALSE; 
     1916    int cli_fe = 0; 
     1917    pj_uint16_t cli_telnet_port = 0; 
    19151918 
    19161919#ifdef STEREO_DEMO 
     
    19701973 
    19711974    status = pjsua_destroy(); 
     1975 
     1976    if (app_config.use_cli) { 
     1977        use_cli = app_config.use_cli; 
     1978        cli_fe = app_config.cli_cfg.cli_fe; 
     1979        cli_telnet_port = app_config.cli_cfg.telnet_cfg.port;    
     1980    } 
     1981 
     1982    /* Reset config */ 
     1983    pj_bzero(&app_config, sizeof(app_config)); 
     1984 
     1985    if (use_cli) {     
     1986        app_config.use_cli = use_cli; 
     1987        app_config.cli_cfg.cli_fe = cli_fe; 
     1988        app_config.cli_cfg.telnet_cfg.port = cli_telnet_port; 
     1989    } 
    19721990 
    19731991    return status; 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_config.c

    r4522 r4525  
    14551455    for (i=0; i<PJ_ARRAY_SIZE(cfg->buddy_cfg); ++i) 
    14561456        pjsua_buddy_config_default(&cfg->buddy_cfg[i]); 
    1457  
    1458     cfg->buddy_cnt = 0; 
     1457     
    14591458    cfg->vid.vcapture_dev = PJMEDIA_VID_DEFAULT_CAPTURE_DEV; 
    14601459    cfg->vid.vrender_dev = PJMEDIA_VID_DEFAULT_RENDER_DEV; 
     
    14731472 
    14741473    /* Initialize default config */ 
    1475     default_config(app_config); 
     1474    default_config(); 
    14761475 
    14771476    /* Parse the arguments */ 
     
    14811480 
    14821481pj_status_t load_config(int argc, 
    1483                                 char **argv, 
    1484                                 pj_str_t *uri_arg) 
     1482                        char **argv, 
     1483                        pj_str_t *uri_arg) 
    14851484{ 
    14861485    pj_status_t status; 
Note: See TracChangeset for help on using the changeset viewer.