redecorating

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2301 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-08-15 21:38:24 +00:00
parent a29d426c8c
commit 5782555e70
5 changed files with 30 additions and 98 deletions

View File

@@ -762,9 +762,14 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originatee_caller_p
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel_t *channel,
const switch_state_handler_table_t *state_handler)
{
int index;
int x, index;
assert(channel != NULL);
for (x = 0; x < SWITCH_MAX_STATE_HANDLERS; x++) {
if (channel->state_handlers[x] == state_handler) {
return x;
}
}
index = channel->state_handler_index++;
if (channel->state_handler_index >= SWITCH_MAX_STATE_HANDLERS) {