]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix scope of endpoint module structures
authorMichael Jerris <mike@jerris.com>
Mon, 29 Oct 2007 18:10:06 +0000 (18:10 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 29 Oct 2007 18:10:06 +0000 (18:10 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6084 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/mod/endpoints/mod_iax/mod_iax.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
src/mod/endpoints/mod_woomera/mod_woomera.c

index aeeda4dc36944fb23d7a51018fcd735f0feb8289..e563a8f4136836a2dfd8d4f06a80c37ed81b0e6d 100644 (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);
 
                        
index 25e9a1c5d45be3cec9fbd68daad917a842236075..536f3cf9afdaf2e302b8ba4f97407a72445fbba9 100644 (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;
 
index 5dc16e0e3f94897b228a82e648d5075af32fbf63..80db60d5cb01c860632bf80e7c54e0a1aca65c9e 100644 (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;
index 0379f87384245b74482aaeefcca2c18d4f42bb17..36e6002433b94a0e5ebcaeefda8ec6e7bff3aba4 100644 (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,
index 85bff6e5b6e7a79b776097b392c0e601ec753294..8df7f04e2df0af0f610006e42791443ffe50f4b8 100644 (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,
index 70357cd49334984bb4cb65f189a7b08b3b265991..9882e415700de9766e6a084824db93775b7dfd7a 100644 (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