]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Move some stuff around so that a NOTIFY dialog won't hang around until the end of...
authorJoshua Colp <jcolp@digium.com>
Tue, 10 Oct 2006 17:21:44 +0000 (17:21 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 10 Oct 2006 17:21:44 +0000 (17:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44819 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 6c10416b2a1b948ff3714906baad47976352a769..812071b4a09ac3f693b7b5ff2d5433c73d31112c 100644 (file)
@@ -12455,9 +12455,7 @@ static int handle_request_notify(struct sip_pvt *p, struct sip_request *req, str
                /* We don't understand this event. */
                /* Here's room to implement incoming voicemail notifications :-) */
                transmit_response(p, "489 Bad event", req);
-               if (!p->lastinvite) 
-                       sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
-               return -1;
+               res = -1;
        } else {
                /* Save nesting depth for now, since there might be other events we will
                        support in the future */
@@ -12558,8 +12556,12 @@ static int handle_request_notify(struct sip_pvt *p, struct sip_request *req, str
                
                /* Confirm that we received this packet */
                transmit_response(p, "200 OK", req);
-               return res;
        };
+
+       if (!p->lastinvite)
+               sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+
+       return res;
 }
 
 /*! \brief Handle incoming OPTIONS request */