From 42ff14d22ab51cea28d21b396b62f2104df8d361 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 16 Sep 2011 15:53:49 -0500 Subject: [PATCH] use index in this loop instead of the max val for the iteration --- libs/freetdm/mod_freetdm/mod_freetdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/freetdm/mod_freetdm/mod_freetdm.c b/libs/freetdm/mod_freetdm/mod_freetdm.c index 9ae717d8cb..c61738d9df 100755 --- a/libs/freetdm/mod_freetdm/mod_freetdm.c +++ b/libs/freetdm/mod_freetdm/mod_freetdm.c @@ -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;