diff options
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 4758f391..730aea00 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -415,13 +415,6 @@ PJ_DEF(pj_status_t) pjsua_acc_add( const pjsua_acc_config *cfg, } } - /* Get CRC of account proxy setting */ - acc->local_route_crc = calc_proxy_crc(acc->cfg.proxy, acc->cfg.proxy_cnt); - - /* Get CRC of global outbound proxy setting */ - acc->global_route_crc=calc_proxy_crc(pjsua_var.ua_cfg.outbound_proxy, - pjsua_var.ua_cfg.outbound_proxy_cnt); - /* Check the route URI's and force loose route if required */ for (i=0; i<acc->cfg.proxy_cnt; ++i) { status = normalize_route_uri(acc->pool, &acc->cfg.proxy[i]); @@ -429,6 +422,13 @@ PJ_DEF(pj_status_t) pjsua_acc_add( const pjsua_acc_config *cfg, return status; } + /* Get CRC of account proxy setting */ + acc->local_route_crc = calc_proxy_crc(acc->cfg.proxy, acc->cfg.proxy_cnt); + + /* Get CRC of global outbound proxy setting */ + acc->global_route_crc=calc_proxy_crc(pjsua_var.ua_cfg.outbound_proxy, + pjsua_var.ua_cfg.outbound_proxy_cnt); + status = initialize_acc(id); if (status != PJ_SUCCESS) { pjsua_perror(THIS_FILE, "Error adding account", status); @@ -744,6 +744,9 @@ PJ_DEF(pj_status_t) pjsua_acc_modify( pjsua_acc_id acc_id, pj_list_push_back(&local_route, r); } + + /* Recalculate the CRC again after route URI normalization */ + local_route_crc = calc_proxy_crc(acc_proxy, cfg->proxy_cnt); } |