fix scope of endpoint module structures

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6084 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-10-29 18:10:06 +00:00
parent 43dbb6c152
commit ae790526e4
6 changed files with 33 additions and 33 deletions

View File

@ -49,7 +49,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_dingaling_shutdown);
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 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
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 @@ static switch_state_handler_table_t channel_event_handlers = {
/*.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 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
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 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dingaling_load)
/* 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 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses
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);

View File

@ -43,7 +43,7 @@ SWITCH_MODULE_DEFINITION(mod_iax, mod_iax_load, mod_iax_shutdown, mod_iax_runtim
#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 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
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_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
}
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 @@ static switch_state_handler_table_t channel_state_handlers = {
/*.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 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_iax_load)
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_MODULE_RUNTIME_FUNCTION(mod_iax_runtime)
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;

View File

@ -44,7 +44,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_portaudio_shutdown);
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 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
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 @@ static switch_state_handler_table_t channel_event_handlers = {
/*.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 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
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 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_portaudio_load)
/* 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 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t
}
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;

View File

@ -1415,7 +1415,7 @@ SWITCH_STANDARD_API(sofia_function)
}
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 @@ static switch_io_routines_t sofia_io_routines = {
/*.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,

View File

@ -47,7 +47,7 @@ SWITCH_MODULE_DEFINITION(mod_wanpipe, mod_wanpipe_load, mod_wanpipe_shutdown, NU
#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_status_t wanpipe_kill_channel(switch_core_session_t *session, int
}
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 @@ static switch_io_routines_t wanpipe_io_routines = {
/*.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,

View File

@ -54,7 +54,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_woomera_runtime);
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