[commit] r6084 - in freeswitch/trunk/src/mod/endpoints: mod_dingaling mod_iax mod_portaudio mod_sofia mod_wanpipe mod_woomera
Author: mikej Date: Mon Oct 29 14:10:06 2007 New Revision: 6084 Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c Log: fix scope of endpoint module structures Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Mon Oct 29 14:10:06 2007 @@ -49,7 +49,7 @@ SWITCH_MODULE_DEFINITION(mod_dingaling, mod_dingaling_load, mod_dingaling_shutdown, NULL); static switch_memory_pool_t *module_pool = NULL; -static switch_endpoint_interface_t *channel_endpoint_interface; +switch_endpoint_interface_t *dingaling_endpoint_interface; static char sub_sql[] = "CREATE TABLE jabber_subscriptions (\n" @@ -1571,7 +1571,7 @@ return SWITCH_STATUS_SUCCESS; } -static switch_state_handler_table_t channel_event_handlers = { +switch_state_handler_table_t dingaling_event_handlers = { /*.on_init */ channel_on_init, /*.on_ring */ channel_on_ring, /*.on_execute */ channel_on_execute, @@ -1580,7 +1580,7 @@ /*.on_transmit */ channel_on_transmit }; -static switch_io_routines_t channel_io_routines = { +switch_io_routines_t dingaling_io_routines = { /*.outgoing_channel */ channel_outgoing_channel, /*.read_frame */ channel_read_frame, /*.write_frame */ channel_write_frame, @@ -1601,7 +1601,7 @@ switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, switch_memory_pool_t **pool) { - if ((*new_session = switch_core_session_request(channel_endpoint_interface, pool)) != 0) { + if ((*new_session = switch_core_session_request(dingaling_endpoint_interface, pool)) != 0) { struct private_object *tech_pvt; switch_channel_t *channel; switch_caller_profile_t *caller_profile = NULL; @@ -1816,10 +1816,10 @@ /* connect my internal structure to the blank pointer passed to me */ *module_interface = switch_loadable_module_create_module_interface(pool, modname); - channel_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE); - channel_endpoint_interface->interface_name = "dingaling"; - channel_endpoint_interface->io_routines = &channel_io_routines; - channel_endpoint_interface->state_handler = &channel_event_handlers; + dingaling_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE); + dingaling_endpoint_interface->interface_name = "dingaling"; + dingaling_endpoint_interface->io_routines = &dingaling_io_routines; + dingaling_endpoint_interface->state_handler = &dingaling_event_handlers; #define PRES_SYNTAX "dl_pres <profile_name>" #define LOGOUT_SYNTAX "dl_logout <profile_name>" @@ -2561,7 +2561,7 @@ status = LDL_STATUS_FALSE; goto done; } - if ((session = switch_core_session_request(channel_endpoint_interface, NULL)) != 0) { + if ((session = switch_core_session_request(dingaling_endpoint_interface, NULL)) != 0) { switch_core_session_add_stream(session, NULL); Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Mon Oct 29 14:10:06 2007 @@ -43,7 +43,7 @@ #include <sys/timeb.h> #endif -static switch_endpoint_interface_t *channel_endpoint_interface; +switch_endpoint_interface_t *iax_endpoint_interface; static switch_memory_pool_t *module_pool = NULL; static int running = 1; @@ -790,7 +790,7 @@ switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, switch_memory_pool_t **pool) { - if ((*new_session = switch_core_session_request(channel_endpoint_interface, pool)) != 0) { + if ((*new_session = switch_core_session_request(iax_endpoint_interface, pool)) != 0) { private_t *tech_pvt; switch_channel_t *channel; switch_caller_profile_t *caller_profile; @@ -850,7 +850,7 @@ } -static switch_state_handler_table_t channel_state_handlers = { +switch_state_handler_table_t iax_state_handlers = { /*.on_init */ channel_on_init, /*.on_ring */ channel_on_ring, /*.on_execute */ channel_on_execute, @@ -859,7 +859,7 @@ /*.on_transmit */ channel_on_transmit }; -static switch_io_routines_t channel_io_routines = { +switch_io_routines_t iax_io_routines = { /*.outgoing_channel */ channel_outgoing_channel, /*.read_frame */ channel_read_frame, /*.write_frame */ channel_write_frame, @@ -876,10 +876,10 @@ module_pool = pool; *module_interface = switch_loadable_module_create_module_interface(pool, modname); - channel_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE); - channel_endpoint_interface->interface_name = "iax"; - channel_endpoint_interface->io_routines = &channel_io_routines; - channel_endpoint_interface->state_handler = &channel_state_handlers; + iax_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE); + iax_endpoint_interface->interface_name = "iax"; + iax_endpoint_interface->io_routines = &iax_io_routines; + iax_endpoint_interface->state_handler = &iax_state_handlers; /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; @@ -1083,7 +1083,7 @@ switch_core_session_t *session; switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "New Inbound Channel %s!\n", iaxevent->ies.calling_name); - if ((session = switch_core_session_request(channel_endpoint_interface, NULL)) != 0) { + if ((session = switch_core_session_request(iax_endpoint_interface, NULL)) != 0) { private_t *tech_pvt; switch_channel_t *channel; Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Mon Oct 29 14:10:06 2007 @@ -44,7 +44,7 @@ SWITCH_MODULE_DEFINITION(mod_portaudio, mod_portaudio_load, mod_portaudio_shutdown, NULL); static switch_memory_pool_t *module_pool = NULL; -static switch_endpoint_interface_t *channel_endpoint_interface; +switch_endpoint_interface_t *portaudio_endpoint_interface; #define SAMPLE_TYPE paInt16 typedef int16_t SAMPLE; @@ -718,7 +718,7 @@ return SWITCH_STATUS_SUCCESS; } -static switch_state_handler_table_t channel_event_handlers = { +switch_state_handler_table_t portaudio_event_handlers = { /*.on_init */ channel_on_init, /*.on_ring */ channel_on_ring, /*.on_execute */ channel_on_execute, @@ -727,7 +727,7 @@ /*.on_transmit */ channel_on_transmit }; -static switch_io_routines_t channel_io_routines = { +switch_io_routines_t portaudio_io_routines = { /*.outgoing_channel */ channel_outgoing_channel, /*.read_frame */ channel_read_frame, /*.write_frame */ channel_write_frame, @@ -746,7 +746,7 @@ switch_core_session_t **new_session, switch_memory_pool_t **pool) { - if ((*new_session = switch_core_session_request(channel_endpoint_interface, pool)) != 0) { + if ((*new_session = switch_core_session_request(portaudio_endpoint_interface, pool)) != 0) { private_t *tech_pvt; switch_channel_t *channel; switch_caller_profile_t *caller_profile; @@ -841,10 +841,10 @@ /* connect my internal structure to the blank pointer passed to me */ *module_interface = switch_loadable_module_create_module_interface(pool, modname); - channel_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE); - channel_endpoint_interface->interface_name = "portaudio"; - channel_endpoint_interface->io_routines = &channel_io_routines; - channel_endpoint_interface->state_handler = &channel_event_handlers; + portaudio_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE); + portaudio_endpoint_interface->interface_name = "portaudio"; + portaudio_endpoint_interface->io_routines = &portaudio_io_routines; + portaudio_endpoint_interface->state_handler = &portaudio_event_handlers; SWITCH_ADD_API(api_interface, "pa", "PortAudio", pa_cmd, "<command> [<args>]"); @@ -1564,7 +1564,7 @@ } dest = argv[0]; - if ((session = switch_core_session_request(channel_endpoint_interface, NULL)) != 0) { + if ((session = switch_core_session_request(portaudio_endpoint_interface, NULL)) != 0) { private_t *tech_pvt; switch_channel_t *channel; char *dialplan = globals.dialplan; Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon Oct 29 14:10:06 2007 @@ -1415,7 +1415,7 @@ } -static switch_io_routines_t sofia_io_routines = { +switch_io_routines_t sofia_io_routines = { /*.outgoing_channel */ sofia_outgoing_channel, /*.read_frame */ sofia_read_frame, /*.write_frame */ sofia_write_frame, @@ -1430,7 +1430,7 @@ /*.write_video_frame*/ sofia_write_video_frame }; -static switch_state_handler_table_t sofia_event_handlers = { +switch_state_handler_table_t sofia_event_handlers = { /*.on_init */ sofia_on_init, /*.on_ring */ sofia_on_ring, /*.on_execute */ sofia_on_execute, Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Mon Oct 29 14:10:06 2007 @@ -47,7 +47,7 @@ #define STRLEN 15 -static switch_endpoint_interface_t *wanpipe_endpoint_interface; +switch_endpoint_interface_t *wanpipe_endpoint_interface; static switch_memory_pool_t *module_pool = NULL; typedef enum { @@ -982,7 +982,7 @@ } -static switch_io_routines_t wanpipe_io_routines = { +switch_io_routines_t wanpipe_io_routines = { /*.outgoing_channel */ wanpipe_outgoing_channel, /*.read_frame */ wanpipe_read_frame, /*.write_frame */ wanpipe_write_frame, @@ -993,7 +993,7 @@ /*.receive_message*/ wanpipe_receive_message }; -static switch_state_handler_table_t wanpipe_state_handlers = { +switch_state_handler_table_t wanpipe_state_handlers = { /*.on_init */ wanpipe_on_init, /*.on_ring */ wanpipe_on_ring, /*.on_execute */ NULL, Modified: freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c Mon Oct 29 14:10:06 2007 @@ -54,7 +54,7 @@ SWITCH_MODULE_DEFINITION(mod_woomera, mod_woomera_load, mod_woomera_shutdown, mod_woomera_runtime); static switch_memory_pool_t *module_pool = NULL; -static switch_endpoint_interface_t *woomera_endpoint_interface; +switch_endpoint_interface_t *woomera_endpoint_interface; #define STRLEN 15 #define FRAME_LEN 480
participants (1)
-
Freeswitch SVN