Fresh updates (Beware... all coded today)

*) Rename *event_handler* to state_handler to avoid confusion with newer eventing engine.
*) Allow application level of state_handler to be layered/stacked (up to 30)
*) Add new core global state_handler stack (also up to 30.. seems reasonable, constant in switch_types.h)



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@554 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-02-07 20:47:15 +00:00
1 parent 7ddaffbcd4
commit 9e85723e3f
8 files changed
+293 -75

No files matched your search

@@ -144,7 +144,7 @@ static switch_status audio_bridge_on_ring(switch_core_session *session)
return SWITCH_STATUS_SUCCESS;
}
static const switch_event_handler_table audio_bridge_peer_event_handlers = {
static const switch_state_handler_table audio_bridge_peer_state_handlers = {
/*.on_init */ NULL,
/*.on_ring */ audio_bridge_on_ring,
/*.on_execute */ NULL,
@@ -153,7 +153,7 @@ static const switch_event_handler_table audio_bridge_peer_event_handlers = {
/*.on_transmit */ NULL
};
static const switch_event_handler_table audio_bridge_caller_event_handlers = {
static const switch_state_handler_table audio_bridge_caller_state_handlers = {
/*.on_init */ NULL,
/*.on_ring */ NULL,
/*.on_execute */ NULL,
@@ -215,8 +215,8 @@ static void audio_bridge_function(switch_core_session *session, char *data)
switch_channel_set_private(caller_channel, peer_session);
switch_channel_set_private(peer_channel, session);
switch_channel_set_event_handlers(caller_channel, &audio_bridge_caller_event_handlers);
switch_channel_set_event_handlers(peer_channel, &audio_bridge_peer_event_handlers);
switch_channel_add_state_handler(caller_channel, &audio_bridge_caller_state_handlers);
switch_channel_add_state_handler(peer_channel, &audio_bridge_peer_state_handlers);
switch_core_session_thread_launch(peer_session);
for (;;) {