]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use index in this loop instead of the max val for the iteration
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 16 Sep 2011 20:53:49 +0000 (15:53 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 16 Sep 2011 20:53:49 +0000 (15:53 -0500)
libs/freetdm/mod_freetdm/mod_freetdm.c

index 9ae717d8cb3af1f10d80fb5e2ea444ae554f74f0..c61738d9dfe8e109d04ed208a29d4fe7b1891ceb 100755 (executable)
@@ -544,7 +544,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
        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, tokencnt);
+               token = ftdm_channel_get_token(tech_pvt->ftdmchan, t);
                if (!zstr(token) && !strcasecmp(uuid, token)) {
                        uuid_found = 1;
                        break;