]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 69887 via svnmerge from
authorChristian Richter <christian.richter@beronet.com>
Fri, 22 Jun 2007 15:30:08 +0000 (15:30 +0000)
committerChristian Richter <christian.richter@beronet.com>
Fri, 22 Jun 2007 15:30:08 +0000 (15:30 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r69887 | crichter | 2007-06-19 15:23:04 +0200 (Di, 19 Jun 2007) | 1 line

when we send out a SETUP, but get no response, we should cleanup everything after reception of a hangup.
........

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

channels/chan_misdn.c

index 6b2a67aa4e65f3581e30fd6ccff13bd5e9fe5290..98c982ba114b8cf6982eb49229d1f108088bfaf6 100644 (file)
@@ -2468,8 +2468,14 @@ static int misdn_hangup(struct ast_channel *ast)
                chan_misdn_log(2, bc->port, " --> state:%s\n", misdn_get_ch_state(p));
                
                switch (p->state) {
-               case MISDN_INCOMING_SETUP:
                case MISDN_CALLING:
+               case MISDN_INCOMING_SETUP:
+                       /* This is the only place in misdn_hangup, where we 
+                        * can call release_chan, else it might create lot's of trouble
+                        * */
+                       ast_log(LOG_NOTICE, "release channel, in CALLING/INCOMING_SETUP state.. no other events happened\n");
+                       release_chan(bc);
+
                        p->state=MISDN_CLEANING;
                        misdn_lib_send_event( bc, EVENT_RELEASE_COMPLETE);
                        break;