]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_freetdm: Remove duplicate code block in channel_on_hangup(), after merge.
authorStefan Knoblich <stkn@openisdn.net>
Wed, 12 Sep 2012 22:58:49 +0000 (00:58 +0200)
committerStefan Knoblich <stkn@openisdn.net>
Wed, 12 Sep 2012 22:58:49 +0000 (00:58 +0200)
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
libs/freetdm/mod_freetdm/mod_freetdm.c

index da6fb095b09ebfff3d9348c987628c7914c20cda..28e58609953df578017024b5d584f1e30cb10d0f 100755 (executable)
@@ -575,34 +575,6 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
        }
 #endif
 
-       name = switch_channel_get_name(channel);
-
-       span_id = tech_pvt->ftdmchan ? ftdm_channel_get_span_id(tech_pvt->ftdmchan) : 0;
-       chan_id = tech_pvt->ftdmchan ? ftdm_channel_get_id(tech_pvt->ftdmchan) : 0;
-
-
-    /* Now verify the device is still attached to this call :-)
-     * Sometimes the FS core takes too long (more than 3 seconds) in calling
-     * channel_on_hangup() and the FreeTDM core decides to take the brute
-     * force approach and hangup and detach themselves from the call. Later
-     * when FS finally comes around, we might end up hanging up the device
-     * attached to another call, this verification avoids that. */
-    uuid = switch_core_session_get_uuid(session);
-    tokencnt = ftdm_channel_get_token_count(tech_pvt->ftdmchan);
-    for (t = 0; t < tokencnt; t++) {
-        token = ftdm_channel_get_token(tech_pvt->ftdmchan, t);
-        if (!zstr(token) && !strcasecmp(uuid, token)) {
-            uuid_found = 1;
-            break;
-        }
-    }
-
-    if (!uuid_found) {
-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Device [%d:%d] is no longer attached to %s. Nothing to do.\n", span_id, chan_id, name);
-        goto end;
-    }
-       
-
        ftdm_channel_clear_token(tech_pvt->ftdmchan, switch_core_session_get_uuid(session));
 
        chantype = ftdm_channel_get_type(tech_pvt->ftdmchan);