return SWITCH_STATUS_SUCCESS;
}
-static const switch_event_handler_table channel_event_handlers = {
+static const switch_state_handler_table channel_event_handlers = {
/*.on_init */ channel_on_init,
/*.on_ring */ channel_on_ring,
/*.on_execute */ channel_on_execute,
/*.next */ &channel_hup_interface
};
-static const switch_event_handler_table channel_event_handlers = {
+static const switch_state_handler_table channel_event_handlers = {
/*.on_init */ channel_on_init,
/*.on_ring */ channel_on_ring,
/*.on_execute */ channel_on_execute,
}
-static const switch_event_handler_table woomerachan_event_handlers = {
+static const switch_state_handler_table woomerachan_event_handlers = {
/*.on_init */ woomerachan_on_init,
/*.on_ring */ woomerachan_on_ring,
/*.on_execute */ woomerachan_on_execute,
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel *channel,
const switch_state_handler_table *state_handler)
{
+ int index;
+
assert(channel != NULL);
- int index = channel->state_handler_index++;
+ index = channel->state_handler_index++;
if (channel->state_handler_index >= SWITCH_MAX_STATE_HANDLERS) {
return -1;