Ignore:
Timestamp:
Dec 13, 2013 11:44:51 AM (9 years ago)
Author:
nanang
Message:

Re #1519: Misc fixes in pjsua2:

  • Changed AccountConfig::toPj() signature, because a pjsua_acc_config instance should not be copied/assigned to another pjsua_acc_config instance as it contains list.
  • Fixed assertion in Endpoint destructor caused by access to pjlib mutex after pjlib is destroyed.
  • Changed VS2005 sample_debug project to allow debugging C++ code such as pjsua2_demo.cpp.
  • Compile warnings on VS2005.
  • Fixed SWIG python unit test.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/account.cpp

    r4674 r4692  
    301301 
    302302/* Convert to pjsip. */ 
    303 pjsua_acc_config AccountConfig::toPj() const 
    304 { 
    305     pjsua_acc_config ret; 
     303void AccountConfig::toPj(pjsua_acc_config &ret) const 
     304{ 
    306305    unsigned i; 
    307306 
     
    425424    ret.vid_stream_rc_cfg.method= videoConfig.rateControlMethod; 
    426425    ret.vid_stream_rc_cfg.bandwidth = videoConfig.rateControlBandwidth; 
    427  
    428     return ret; 
    429426} 
    430427 
     
    670667                     bool make_default) throw(Error) 
    671668{ 
    672     pjsua_acc_config pj_acc_cfg = acc_cfg.toPj(); 
    673  
     669    pjsua_acc_config pj_acc_cfg; 
     670     
     671    acc_cfg.toPj(pj_acc_cfg); 
    674672    pj_acc_cfg.user_data = (void*)this; 
    675673    PJSUA2_CHECK_EXPR( pjsua_acc_add(&pj_acc_cfg, make_default, &id) ); 
     
    678676void Account::modify(const AccountConfig &acc_cfg) throw(Error) 
    679677{ 
    680     pjsua_acc_config pj_acc_cfg = acc_cfg.toPj(); 
     678    pjsua_acc_config pj_acc_cfg; 
     679     
     680    acc_cfg.toPj(pj_acc_cfg); 
    681681    pj_acc_cfg.user_data = (void*)this; 
    682682    PJSUA2_CHECK_EXPR( pjsua_acc_modify(id, &pj_acc_cfg) ); 
Note: See TracChangeset for help on using the changeset viewer.