From: Mark Spencer Date: Thu, 9 Sep 2004 15:40:07 +0000 (+0000) Subject: Only pool CONGESTION if there is an owner in the case of a 501 X-Git-Tag: 1.0.0~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa2a8ed77c354ec37c51616c8564b9bb1cbf3125;p=thirdparty%2Fasterisk.git Only pool CONGESTION if there is an owner in the case of a 501 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3754 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 82780e0272..0074eee759 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6726,9 +6726,10 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ break; case 501: /* Not Implemented */ - if (!strcasecmp(msg, "INVITE")) - ast_queue_control(p->owner, AST_CONTROL_CONGESTION); - else + if (!strcasecmp(msg, "INVITE")) { + if (p->owner) + ast_queue_control(p->owner, AST_CONTROL_CONGESTION); + } else ast_log(LOG_WARNING, "Host '%s' does not implement '%s'\n", ast_inet_ntoa(iabuf, sizeof(iabuf), p->sa.sin_addr), msg); break; default: