diff options
author | Liong Sauw Ming <ming@teluu.com> | 2014-10-01 04:21:55 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2014-10-01 04:21:55 +0000 |
commit | c92580e3d8e95c6d7bfe9fc2cdaa06a669f2bfd2 (patch) | |
tree | 9e32930b8957b9ef483c0107a549bdaf91642b61 /pjsip | |
parent | c72e83ba00e0f3cc1bdbb1f0584c598f2becf54f (diff) |
Re #1782 (misc): Do not copy the public address and bound address if pjsua_acc_modify()'s new setting doesn't change those
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4935 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 5e095e60..7a70cd31 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -1282,8 +1282,13 @@ PJ_DEF(pj_status_t) pjsua_acc_modify( pjsua_acc_id acc_id, pjsua_transport_config_dup(acc->pool, &acc->cfg.rtp_cfg, &cfg->rtp_cfg); } else { + pj_str_t p_addr = acc->cfg.rtp_cfg.public_addr; + pj_str_t b_addr = acc->cfg.rtp_cfg.bound_addr; + /* ..to save memory by not using the pool */ acc->cfg.rtp_cfg = cfg->rtp_cfg; + acc->cfg.rtp_cfg.public_addr = p_addr; + acc->cfg.rtp_cfg.bound_addr = b_addr; } acc->cfg.ipv6_media_use = cfg->ipv6_media_use; |