diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-12-05 04:08:40 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-12-05 04:08:40 +0000 |
commit | 49ef04a6eae12130b707ed92737fc1c804519f93 (patch) | |
tree | 72571290dce13c198972f8d31ff6f7a86de2c5f6 /pjsip | |
parent | 2534f1dbf323841c1b23f05efd16a92b5e3ebf1c (diff) |
Fixed Contact generation failure and crash on unregistration if regc initialization failed
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1617 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 829f5616..a2e0002b 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -900,6 +900,8 @@ static pj_status_t pjsua_regc_init(int acc_id) pjsua_perror(THIS_FILE, "Unable to generate suitable Contact header" " for registration", status); + pjsip_regc_destroy(acc->regc); + acc->regc = NULL; return status; } @@ -913,6 +915,8 @@ static pj_status_t pjsua_regc_init(int acc_id) pjsua_perror(THIS_FILE, "Client registration initialization error", status); + pjsip_regc_destroy(acc->regc); + acc->regc = NULL; return status; } @@ -1432,7 +1436,7 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uac_contact( pj_pool_t *pool, /* If destination URI specifies IPv6, then set transport type * to use IPv6 as well. */ - if (pj_strchr(suri, ':')) + if (pj_strchr(&sip_uri->host, ':')) tp_type = (pjsip_transport_type_e)(((int)tp_type) + PJSIP_TRANSPORT_IPV6); flag = pjsip_transport_get_flag_from_type(tp_type); |