Ignore:
Timestamp:
Sep 3, 2018 7:13:40 AM (3 years ago)
Author:
ming
Message:

Re #2100: Fixed duplication of crypto names and keys to use pj_strdup(). Otherwise, when the account/global config's input strings are modified (or deallocated) after being passed to PJSIP, then the crypto name matching will fail and we will generate error: PJMEDIA_SRTP_ENOTSUPCRYPTO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r5838 r5872  
    140140    pjsua_turn_config_dup(pool, &dst->turn_cfg, &src->turn_cfg); 
    141141 
     142    pjsua_srtp_opt_dup(pool, &dst->srtp_opt, &src->srtp_opt, PJ_FALSE); 
     143 
    142144    pj_strdup(pool, &dst->ka_data, &src->ka_data); 
    143145 
     
    14241426    acc->cfg.ip_change_cfg.hangup_calls = cfg->ip_change_cfg.hangup_calls;     
    14251427    acc->cfg.ip_change_cfg.reinvite_flags = cfg->ip_change_cfg.reinvite_flags; 
     1428 
     1429    /* SRTP setting */ 
     1430    pjsua_srtp_opt_dup(acc->pool, &acc->cfg.srtp_opt, &cfg->srtp_opt, 
     1431                       PJ_TRUE); 
    14261432 
    14271433    /* RTCP-FB config */ 
Note: See TracChangeset for help on using the changeset viewer.