From: Anthony Minessale Date: Fri, 16 Sep 2011 20:53:49 +0000 (-0500) Subject: use index in this loop instead of the max val for the iteration X-Git-Tag: v1.2-rc1~51^2~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42ff14d22ab51cea28d21b396b62f2104df8d361;p=thirdparty%2Ffreeswitch.git use index in this loop instead of the max val for the iteration --- 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;