]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm: fix collision hangup
authorMoises Silva <moy@sangoma.com>
Wed, 16 Jun 2010 15:19:19 +0000 (11:19 -0400)
committerMoises Silva <moy@sangoma.com>
Wed, 16 Jun 2010 15:22:18 +0000 (11:22 -0400)
libs/freetdm/mod_freetdm/mod_freetdm.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 7dea7df..6fe47a0
@@ -1247,7 +1247,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                }
 
 
-               if (ftdm_channel_call_place(ftdmchan) != FTDM_SUCCESS) {
+               if ((status = ftdm_channel_call_place(ftdmchan)) != FTDM_SUCCESS) {
                        if (tech_pvt->read_codec.implementation) {
                                switch_core_codec_destroy(&tech_pvt->read_codec);
                        }
@@ -1256,8 +1256,11 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                                switch_core_codec_destroy(&tech_pvt->write_codec);
                        }
                        switch_core_session_destroy(new_session);
+                       if (status == FTDM_BREAK) {
+                               ftdmchan = NULL;
+                       }
                        cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
-                       goto fail;
+            goto fail;
                }
 
                ftdm_channel_init(ftdmchan);