diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2015-07-31 11:35:20 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2015-07-31 11:35:20 +0000 |
commit | 137975dbd2af204a8a5dd8df948ea417ce0e7599 (patch) | |
tree | e1d021e7f47d20836f3def48de3f4d1c4f0a1eff | |
parent | cb470892bfea4b815e5f3f9051d04c8c551f8935 (diff) |
Fixed #1873: Only reset account transport pointer after a successful unregistration.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5143 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index a6cf0e70..8e327ee5 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -2198,6 +2198,9 @@ static void regc_cb(struct pjsip_regc_cbparam *param) acc->reg_mapped_addr.slen = 0; acc->rfc5626_status = OUTBOUND_UNKNOWN; + /* Reset pointer to registration transport */ + acc->auto_rereg.reg_tp = NULL; + /* Stop keep-alive timer if any. */ update_keep_alive(acc, PJ_FALSE, NULL); @@ -2509,7 +2512,11 @@ PJ_DEF(pj_status_t) pjsua_acc_set_registration( pjsua_acc_id acc_id, } /* Reset pointer to registration transport */ - pjsua_var.acc[acc_id].auto_rereg.reg_tp = NULL; + // Do not reset this here, as if currently there is another registration + // on progress, this registration will fail but transport pointer will + // become NULL which will prevent transport to be destroyed immediately + // after disconnected (which may cause iOS app getting killed (see #1482). + //pjsua_var.acc[acc_id].auto_rereg.reg_tp = NULL; if (renew) { if (pjsua_var.acc[acc_id].regc == NULL) { |