summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-09-09 12:01:59 +0000
committerOlle Johansson <oej@edvina.net>2006-09-09 12:01:59 +0000
commitd0cbbaf8d73a3684a6bcb1f2692301d0d0f5d1c7 (patch)
tree5f2fa1c4fa24bb71fda5e9d303bb0bb5ce16bdca /channels
parent562b491a85aa2adc2111eecf407357e7a05c4e51 (diff)
Don't destroy pvt prematurely. Wait for answer or timeout.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 6354d6d0a..468da78c1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11193,12 +11193,11 @@ static void check_pendings(struct sip_pvt *p)
transmit_request_with_auth(p, SIP_CANCEL, p->ocseq, 1, 0);
/* Actually don't destroy us yet, wait for the 487 on our original
INVITE, but do set an autodestruct just in case we never get it. */
- sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
} else {
transmit_request_with_auth(p, SIP_BYE, 0, 1, 1);
- ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
ast_clear_flag(&p->flags[0], SIP_CAN_BYE);
}
+ sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
} else if (ast_test_flag(&p->flags[0], SIP_NEEDREINVITE)) {
if (option_debug)
ast_log(LOG_DEBUG, "Sending pending reinvite on '%s'\n", p->callid);