summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2016-06-22 03:42:32 +0000
committerNanang Izzuddin <nanang@teluu.com>2016-06-22 03:42:32 +0000
commitaff9670b0507d057d59c7e2e1af2b5c226d02fda (patch)
tree5d29b094880a76ff7ab0049fb7ddd901152789ef /pjsip
parentc17fa2933d49e42d429229cc185e2794ebecc1d9 (diff)
Fix #1936: Reset 'regc->has_tsx' when the sending fails.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5353 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsip-ua/sip_reg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pjsip/src/pjsip-ua/sip_reg.c b/pjsip/src/pjsip-ua/sip_reg.c
index cadb1409..8b7f928b 100644
--- a/pjsip/src/pjsip-ua/sip_reg.c
+++ b/pjsip/src/pjsip-ua/sip_reg.c
@@ -1432,6 +1432,11 @@ PJ_DEF(pj_status_t) pjsip_regc_send(pjsip_regc *regc, pjsip_tx_data *tdata)
status = pjsip_endpt_send_request(regc->endpt, tdata, REGC_TSX_TIMEOUT,
regc, &regc_tsx_callback);
if (status!=PJ_SUCCESS) {
+ /* On failure, regc_tsx_callback() may not be called, so we need
+ * to reset regc->has_tsx here (see also ticket #1936).
+ */
+ regc->has_tsx = PJ_FALSE;
+
PJ_LOG(4,(THIS_FILE, "Error sending request, status=%d", status));
}