use index in this loop instead of the max val for the iteration

This commit is contained in:
Anthony Minessale 2011-09-16 15:53:49 -05:00
parent 4048a087b7
commit 42ff14d22a

View File

@ -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;