Re #2059 (misc): Update account tp_type when transport_id is changed on pjsua_acc_modify().

Thanks to Oded Arbel for the report.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5718 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Riza Sulistyo 2017-12-31 09:08:56 +00:00
parent 3a92ff29be
commit d0d441b96e
1 changed files with 6 additions and 0 deletions

View File

@ -1045,6 +1045,12 @@ PJ_DEF(pj_status_t) pjsua_acc_modify( pjsua_acc_id acc_id,
/* Transport */
if (acc->cfg.transport_id != cfg->transport_id) {
acc->cfg.transport_id = cfg->transport_id;
if (acc->cfg.transport_id != PJSUA_INVALID_ID)
acc->tp_type = pjsua_var.tpdata[acc->cfg.transport_id].type;
else
acc->tp_type = PJSIP_TRANSPORT_UNSPECIFIED;
update_reg = PJ_TRUE;
unreg_first = PJ_TRUE;
}