]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
when we send out a SETUP, but get no response, we should cleanup everything after...
authorChristian Richter <christian.richter@beronet.com>
Tue, 19 Jun 2007 13:23:04 +0000 (13:23 +0000)
committerChristian Richter <christian.richter@beronet.com>
Tue, 19 Jun 2007 13:23:04 +0000 (13:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69887 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_misdn.c

index 3181a1a53b096fba9d0003f2b707f858eee1dbb4..a5aef1dfb01a5b03d88b25b4484fab32007a4f13 100644 (file)
@@ -2304,8 +2304,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;