Merged revisions 114148 via svnmerge from
authorOlle Johansson <oej@edvina.net>
Tue, 15 Apr 2008 20:39:29 +0000 (20:39 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 15 Apr 2008 20:39:29 +0000 (20:39 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114148 | oej | 2008-04-15 22:26:05 +0200 (Tis, 15 Apr 2008) | 2 lines

Handle subscribe queues in all situations... Thanks to festr_ on irc for telling me about this bug.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114151 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 47176c6..44eb1c1 100644 (file)
@@ -15505,6 +15505,11 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                                } else {
                                        if (!p->subscribed && !p->refer)
                                                p->needdestroy = 1;
                                } else {
                                        if (!p->subscribed && !p->refer)
                                                p->needdestroy = 1;
+                                       if (ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE)) {
+                                               /* Ready to send the next state we have on queue */
+                                               ast_clear_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE);
+                                               cb_extensionstate((char *)p->context, (char *)p->exten, p->laststate, (void *) p);
+                                       }
                                }
                        } else if (sipmethod == SIP_BYE)
                                p->needdestroy = 1;
                                }
                        } else if (sipmethod == SIP_BYE)
                                p->needdestroy = 1;