fix auto in will not use the last slot

This commit is contained in:
Michael Jerris 2013-05-06 11:45:30 -04:00
parent b4826c1a7f
commit bea4bb0950
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ static valet_token_t *next_id(switch_core_session_t *session, valet_lot_t *lot,
} }
} }
for (i = min; (i < max || max == 0); i++) { for (i = min; (i <= max || max == 0); i++) {
switch_snprintf(buf, sizeof(buf), "%d", i); switch_snprintf(buf, sizeof(buf), "%d", i);
switch_mutex_lock(lot->mutex); switch_mutex_lock(lot->mutex);
token = (valet_token_t *) switch_core_hash_find(lot->hash, buf); token = (valet_token_t *) switch_core_hash_find(lot->hash, buf);