]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Bail out if we have no refer structure and we get a refer response
authorJoshua Colp <jcolp@digium.com>
Tue, 10 Oct 2006 16:30:00 +0000 (16:30 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 10 Oct 2006 16:30:00 +0000 (16:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44806 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 6cb703944f56de323389df72eb7b7e8b8fa2cbe5..6c10416b2a1b948ff3714906baad47976352a769 100644 (file)
@@ -11539,6 +11539,12 @@ static void handle_response_refer(struct sip_pvt *p, int resp, char *rest, struc
        char *auth = "Proxy-Authenticate";
        char *auth2 = "Proxy-Authorization";
 
+       /* If no refer structure exists, then do nothing */
+       if (!p->refer) {
+               ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+               return;
+       }
+
        switch (resp) {
        case 202:   /* Transfer accepted */
                /* We need  to do something here */