]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm: Try to resolve OPENZAP-173
authorMoises Silva <moy@sangoma.com>
Mon, 19 Mar 2012 13:20:44 +0000 (09:20 -0400)
committerMoises Silva <moy@sangoma.com>
Mon, 19 Mar 2012 13:20:44 +0000 (09:20 -0400)
         The token count needs to be updated after the master session token is cleared
         and before checking for other tokens

libs/freetdm/mod_freetdm/mod_freetdm.c

index 7789446616308161ecda9e6f31c7778b6e48da41..1c41ed3b742cf689a2ec8b4813b5c6378cb274cf 100755 (executable)
@@ -586,6 +586,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
                break;
        case FTDM_CHAN_TYPE_FXS:
                {
+                       tokencnt = ftdm_channel_get_token_count(tech_pvt->ftdmchan);
                        if (!ftdm_channel_call_check_busy(tech_pvt->ftdmchan) && !ftdm_channel_call_check_done(tech_pvt->ftdmchan)) {
                                if (tokencnt) {
                                        cycle_foreground(tech_pvt->ftdmchan, 0, NULL);