Only pool CONGESTION if there is an owner in the case of a 501
authorMark Spencer <markster@digium.com>
Thu, 9 Sep 2004 15:40:07 +0000 (15:40 +0000)
committerMark Spencer <markster@digium.com>
Thu, 9 Sep 2004 15:40:07 +0000 (15:40 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3754 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 82780e0..0074eee 100755 (executable)
@@ -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: