From a869aae1563d1ec8d5360e316544fa9f81b88598 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Thu, 21 Aug 2003 16:24:55 +0000 Subject: [PATCH] Only suggest destroy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1394 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5a07753cb3..e600f1c921 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -434,9 +434,7 @@ static int retrans_pkt(void *data) ast_queue_hangup(pkt->owner->owner, 1); } else { /* If no owner, destroy now */ - ast_mutex_unlock(&pkt->owner->lock); - sip_destroy(pkt->owner); - pkt = NULL; + pkt->owner->needdestroy = 1; } } } else { @@ -447,9 +445,7 @@ static int retrans_pkt(void *data) ast_queue_hangup(pkt->owner->owner, 1); } else { /* If no owner, destroy now */ - ast_mutex_unlock(&pkt->owner->lock); - sip_destroy(pkt->owner); - pkt=NULL; + pkt->owner->needdestroy = 1; } } if (pkt) @@ -4076,7 +4072,7 @@ static int do_proxy_auth(struct sip_pvt *p, struct sip_request *req, char *msg) /* No way to authenticate */ return -1; } - return transmit_invite(p,"INVITE",1,digest, NULL,NULL); + return transmit_invite(p,msg,!strcasecmp(msg, "INVITE"),digest, NULL,NULL); } static int reply_digest(struct sip_pvt *p, struct sip_request *req, char *header, char *orig_header, char *digest, int digest_len) {