]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
handle failure on chan open on new setup msg
authorMichael Jerris <mike@jerris.com>
Fri, 29 Feb 2008 17:55:29 +0000 (17:55 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 29 Feb 2008 17:55:29 +0000 (17:55 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@418 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/zap_isdn.c

index 5bfe4711442635fab4810d1bea4a6f253d86ad2e..34cef4846772c927c555c35d70e6bbe8550d01bd 100644 (file)
@@ -238,8 +238,12 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen)
                                } 
 
                                if (fail) {
-                                       zap_log(ZAP_LOG_CRIT, "FIX ME! %s\n", zap_channel_state2str(zchan->state));
-                                       // add me 
+                                       if (zchan) {
+                                               zap_log(ZAP_LOG_CRIT, "FIX ME! %s\n", zap_channel_state2str(zchan->state));
+                                               zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_HANGUP);
+                                       } else {
+                                               zap_log(ZAP_LOG_CRIT, "Failed to open channel for new setup message\n");
+                                       }
                                }
                                
                        }