forked from Mirrors/freeswitch
C++ says we can't use "interface" as a variable name.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1305 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
7bacd1a0ad
commit
c904577269
@ -216,7 +216,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, ch
|
||||
\param filename the path to the module's dll or so file
|
||||
\return SWITCH_STATUS_SUCCESS on a successful load
|
||||
*/
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename);
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename);
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_reload(void);
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_pause(void);
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_resume(void);
|
||||
|
@ -95,11 +95,11 @@ static const switch_loadable_module_interface_t mod_bridgecall_module_interface
|
||||
/*.application_interface */ &bridge_application_interface
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_bridgecall_module_interface;
|
||||
*module_interface = &mod_bridgecall_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -171,11 +171,11 @@ static const switch_loadable_module_interface_t mod_commands_module_interface =
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_commands_module_interface;
|
||||
*module_interface = &mod_commands_module_interface;
|
||||
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
|
@ -64,10 +64,10 @@ static switch_loadable_module_interface_t echo_module_interface = {
|
||||
/*.directory_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &echo_module_interface;
|
||||
*module_interface = &echo_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -241,11 +241,11 @@ static const switch_loadable_module_interface_t mod_ivrtest_module_interface = {
|
||||
/*.application_interface */ &ivrtest_application_interface
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_ivrtest_module_interface;
|
||||
*module_interface = &mod_ivrtest_module_interface;
|
||||
|
||||
/* test global state handlers */
|
||||
switch_core_add_state_handler(&state_handlers);
|
||||
|
@ -106,11 +106,11 @@ static const switch_loadable_module_interface_t mod_playback_module_interface =
|
||||
/*.application_interface */ &playback_application_interface
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_playback_module_interface;
|
||||
*module_interface = &mod_playback_module_interface;
|
||||
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
|
@ -269,7 +269,7 @@ static const switch_loadable_module_interface_t cepstral_module_interface = {
|
||||
/*.directory_interface */ NULL
|
||||
};
|
||||
|
||||
switch_status_t switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
switch_status_t switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
/* Open the Swift TTS Engine */
|
||||
@ -279,7 +279,7 @@ switch_status_t switch_module_load(const switch_loadable_module_interface_t **in
|
||||
}
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &cepstral_module_interface;
|
||||
*module_interface = &cepstral_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -302,10 +302,10 @@ static switch_loadable_module_interface_t g711_module_interface = {
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &g711_module_interface;
|
||||
*module_interface = &g711_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -272,12 +272,12 @@ static switch_loadable_module_interface_t g729_module_interface = {
|
||||
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface,
|
||||
char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &g729_module_interface;
|
||||
*module_interface = &g729_module_interface;
|
||||
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
|
@ -162,12 +162,12 @@ static switch_loadable_module_interface_t gsm_module_interface = {
|
||||
/*.codec_interface */ &gsm_codec_interface,
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface,
|
||||
char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &gsm_module_interface;
|
||||
*module_interface = &gsm_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -274,12 +274,12 @@ static switch_loadable_module_interface_t ilbc_module_interface = {
|
||||
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface,
|
||||
char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &ilbc_module_interface;
|
||||
*module_interface = &ilbc_module_interface;
|
||||
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
|
@ -196,10 +196,10 @@ static switch_loadable_module_interface_t raw_module_interface = {
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &raw_module_interface;
|
||||
*module_interface = &raw_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -334,10 +334,10 @@ static switch_loadable_module_interface_t speex_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &speex_module_interface;
|
||||
*module_interface = &speex_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -117,11 +117,11 @@ static const switch_loadable_module_interface_t demo_dialplan_module_interface =
|
||||
/*.application_interface = */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &demo_dialplan_module_interface;
|
||||
*module_interface = &demo_dialplan_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -168,12 +168,12 @@ static const switch_loadable_module_interface_t directory_dialplan_module_interf
|
||||
/*.application_interface = */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
load_config();
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &directory_dialplan_module_interface;
|
||||
*module_interface = &directory_dialplan_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -213,11 +213,11 @@ static const switch_loadable_module_interface_t dialplan_module_interface = {
|
||||
/*.application_interface = */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &dialplan_module_interface;
|
||||
*module_interface = &dialplan_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -220,10 +220,10 @@ static switch_loadable_module_interface_t skel_module_interface = {
|
||||
/*.directory_interface */ &ldap_directory_interface
|
||||
};
|
||||
|
||||
switch_status_t switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
switch_status_t switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &skel_module_interface;
|
||||
*module_interface = &skel_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -1105,7 +1105,7 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
|
||||
|
||||
}
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
@ -1116,7 +1116,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
load_config();
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &channel_module_interface;
|
||||
*module_interface = &channel_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -1071,7 +1071,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
/* NOTE: **interface is **_interface because the common lib redefines interface to struct in some situations */
|
||||
|
||||
@ -1085,7 +1085,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
switch_core_hash_init(&globals.srtp_hash, module_pool);
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &exosip_module_interface;
|
||||
*module_interface = &exosip_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -790,7 +790,7 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
|
||||
|
||||
}
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
@ -799,7 +799,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
}
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &channel_module_interface;
|
||||
*module_interface = &channel_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -523,7 +523,7 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
|
||||
}
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
@ -545,7 +545,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
}
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &channel_module_interface;
|
||||
*module_interface = &channel_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -1298,7 +1298,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
switch_config_t cfg;
|
||||
@ -1373,7 +1373,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &woomerachan_module_interface;
|
||||
*module_interface = &woomerachan_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -115,7 +115,7 @@ static switch_loadable_module_interface_t event_test_module_interface = {
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
|
||||
@ -159,7 +159,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &event_test_module_interface;
|
||||
*module_interface = &event_test_module_interface;
|
||||
|
||||
if (switch_event_bind((char *) modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) !=
|
||||
SWITCH_STATUS_SUCCESS) {
|
||||
|
@ -105,10 +105,10 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
|
||||
#endif
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &event_test_module_interface;
|
||||
*module_interface = &event_test_module_interface;
|
||||
|
||||
if (switch_event_reserve_subclass(MY_EVENT_COOL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!");
|
||||
|
@ -355,10 +355,10 @@ static switch_loadable_module_interface_t xmpp_event_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &xmpp_event_module_interface;
|
||||
*module_interface = &xmpp_event_module_interface;
|
||||
|
||||
if (load_config() != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
@ -264,7 +264,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
|
||||
}
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
@ -296,7 +296,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
}
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &zeroconf_module_interface;
|
||||
*module_interface = &zeroconf_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -309,7 +309,7 @@ static switch_status_t setup_formats(void)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
|
||||
@ -319,7 +319,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
sndfile_file_interface.extens = supported_formats;
|
||||
*interface = &sndfile_module_interface;
|
||||
*module_interface = &sndfile_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -110,7 +110,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
PerlInterpreter *my_perl;
|
||||
@ -133,7 +133,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &perl_module_interface;
|
||||
*module_interface = &perl_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -2190,7 +2190,7 @@ static switch_loadable_module_interface_t spidermonkey_module_interface = {
|
||||
/*.directory_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
switch_status_t status;
|
||||
|
||||
@ -2199,7 +2199,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
}
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &spidermonkey_module_interface;
|
||||
*module_interface = &spidermonkey_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -134,7 +134,7 @@ static switch_status_t switch_console_logger(const switch_log_node_t *node, swit
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
|
||||
@ -143,7 +143,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &console_module_interface;
|
||||
*module_interface = &console_module_interface;
|
||||
|
||||
/* setup my logger function */
|
||||
switch_log_bind_logger(switch_console_logger, SWITCH_LOG_DEBUG);
|
||||
|
@ -113,11 +113,11 @@ static const switch_loadable_module_interface_t mod_timers_module_interface = {
|
||||
/*.switch_application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_timers_module_interface;
|
||||
*module_interface = &mod_timers_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
struct switch_loadable_module {
|
||||
char *filename;
|
||||
const switch_loadable_module_interface_t *interface;
|
||||
const switch_loadable_module_interface_t *module_interface;
|
||||
void *lib;
|
||||
switch_module_load_t switch_module_load;
|
||||
switch_module_runtime_t switch_module_runtime;
|
||||
@ -72,11 +72,11 @@ static void *switch_loadable_module_exec(switch_thread_t *thread, void *obj)
|
||||
for (restarts = 0; status != SWITCH_STATUS_TERM; restarts++) {
|
||||
status = module->switch_module_runtime();
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Thread ended for %s\n", module->interface->module_name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Thread ended for %s\n", module->module_interface->module_name);
|
||||
|
||||
if (ts->pool) {
|
||||
switch_memory_pool_t *pool = ts->pool;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroying Pool for %s\n", module->interface->module_name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroying Pool for %s\n", module->module_interface->module_name);
|
||||
switch_core_destroy_memory_pool(&pool);
|
||||
}
|
||||
switch_yield(1000000);
|
||||
@ -93,19 +93,19 @@ static switch_status_t switch_loadable_module_process(char *key, switch_loadable
|
||||
|
||||
switch_core_hash_insert(loadable_modules.module_hash, key, new_module);
|
||||
|
||||
if (new_module->interface->endpoint_interface) {
|
||||
if (new_module->module_interface->endpoint_interface) {
|
||||
const switch_endpoint_interface_t *ptr;
|
||||
for (ptr = new_module->interface->endpoint_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->endpoint_interface; ptr; ptr = ptr->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Endpoint '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.endpoint_hash, (char *) ptr->interface_name, (void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->codec_interface) {
|
||||
if (new_module->module_interface->codec_interface) {
|
||||
const switch_codec_implementation_t *impl;
|
||||
const switch_codec_interface_t *ptr;
|
||||
|
||||
for (ptr = new_module->interface->codec_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->codec_interface; ptr; ptr = ptr->next) {
|
||||
for (impl = ptr->implementations; impl; impl = impl->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,
|
||||
"Adding Codec '%s' (%s) %dkhz %dms\n",
|
||||
@ -118,47 +118,47 @@ static switch_status_t switch_loadable_module_process(char *key, switch_loadable
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->dialplan_interface) {
|
||||
if (new_module->module_interface->dialplan_interface) {
|
||||
const switch_dialplan_interface_t *ptr;
|
||||
|
||||
for (ptr = new_module->interface->dialplan_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->dialplan_interface; ptr; ptr = ptr->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Dialplan '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.dialplan_hash, (char *) ptr->interface_name, (void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->timer_interface) {
|
||||
if (new_module->module_interface->timer_interface) {
|
||||
const switch_timer_interface_t *ptr;
|
||||
|
||||
for (ptr = new_module->interface->timer_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->timer_interface; ptr; ptr = ptr->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Timer '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.timer_hash, (char *) ptr->interface_name, (void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->application_interface) {
|
||||
if (new_module->module_interface->application_interface) {
|
||||
const switch_application_interface_t *ptr;
|
||||
|
||||
for (ptr = new_module->interface->application_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->application_interface; ptr; ptr = ptr->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Application '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.application_hash,
|
||||
(char *) ptr->interface_name, (void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->api_interface) {
|
||||
if (new_module->module_interface->api_interface) {
|
||||
const switch_api_interface_t *ptr;
|
||||
|
||||
for (ptr = new_module->interface->api_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->api_interface; ptr; ptr = ptr->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding API Function '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.api_hash, (char *) ptr->interface_name, (void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->file_interface) {
|
||||
if (new_module->module_interface->file_interface) {
|
||||
const switch_file_interface_t *ptr;
|
||||
|
||||
for (ptr = new_module->interface->file_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->file_interface; ptr; ptr = ptr->next) {
|
||||
int i;
|
||||
for (i = 0; ptr->extens[i]; i++) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding File Format '%s'\n", ptr->extens[i]);
|
||||
@ -167,19 +167,19 @@ static switch_status_t switch_loadable_module_process(char *key, switch_loadable
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->speech_interface) {
|
||||
if (new_module->module_interface->speech_interface) {
|
||||
const switch_speech_interface_t *ptr;
|
||||
|
||||
for (ptr = new_module->interface->speech_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->speech_interface; ptr; ptr = ptr->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Speech interface '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.speech_hash, (char *) ptr->interface_name, (void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->directory_interface) {
|
||||
if (new_module->module_interface->directory_interface) {
|
||||
const switch_directory_interface_t *ptr;
|
||||
|
||||
for (ptr = new_module->interface->directory_interface; ptr; ptr = ptr->next) {
|
||||
for (ptr = new_module->module_interface->directory_interface; ptr; ptr = ptr->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Directory interface '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.directory_hash, (char *) ptr->interface_name, (void *) ptr);
|
||||
}
|
||||
@ -199,7 +199,7 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l
|
||||
switch_module_load_t load_func_ptr = NULL;
|
||||
int loading = 1;
|
||||
const char *err = NULL;
|
||||
switch_loadable_module_interface_t *interface = NULL;
|
||||
switch_loadable_module_interface_t *module_interface = NULL;
|
||||
char derr[512] = "";
|
||||
|
||||
assert(filename != NULL);
|
||||
@ -222,9 +222,9 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l
|
||||
break;
|
||||
}
|
||||
|
||||
if (load_func_ptr(&interface, filename) != SWITCH_STATUS_SUCCESS) {
|
||||
if (load_func_ptr(&module_interface, filename) != SWITCH_STATUS_SUCCESS) {
|
||||
err = "Module load routine returned an error";
|
||||
interface = NULL;
|
||||
module_interface = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l
|
||||
}
|
||||
|
||||
module->filename = switch_core_permenant_strdup(filename);
|
||||
module->interface = interface;
|
||||
module->module_interface = module_interface;
|
||||
module->switch_module_load = load_func_ptr;
|
||||
|
||||
if ((status = apr_dso_sym(&function_handle, dso, "switch_module_shutdown")) == APR_SUCCESS) {
|
||||
@ -260,7 +260,7 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l
|
||||
}
|
||||
|
||||
*new_module = module;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Successfully Loaded [%s]\n", interface->module_name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Successfully Loaded [%s]\n", module_interface->module_name);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
@ -321,7 +321,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
|
||||
switch_module_load_t load_func_ptr = NULL;
|
||||
int loading = 1;
|
||||
const char *err = NULL;
|
||||
switch_loadable_module_interface_t *interface = NULL;
|
||||
switch_loadable_module_interface_t *module_interface = NULL;
|
||||
|
||||
if ((module = switch_core_permenant_alloc(sizeof(switch_loadable_module_t))) == 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Couldn't allocate memory\n");
|
||||
@ -336,9 +336,9 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
|
||||
break;
|
||||
}
|
||||
|
||||
if (load_func_ptr(&interface, filename) != SWITCH_STATUS_SUCCESS) {
|
||||
if (load_func_ptr(&module_interface, filename) != SWITCH_STATUS_SUCCESS) {
|
||||
err = "Module load routine returned an error";
|
||||
interface = NULL;
|
||||
module_interface = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -356,7 +356,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
|
||||
}
|
||||
|
||||
module->filename = switch_core_permenant_strdup(filename);
|
||||
module->interface = interface;
|
||||
module->module_interface = module_interface;
|
||||
module->switch_module_load = load_func_ptr;
|
||||
|
||||
if (switch_module_shutdown) {
|
||||
@ -368,7 +368,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
|
||||
if (module->switch_module_runtime) {
|
||||
switch_core_launch_thread(switch_loadable_module_exec, module, loadable_modules.pool);
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Successfully Loaded [%s]\n", interface->module_name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Successfully Loaded [%s]\n", module_interface->module_name);
|
||||
return switch_loadable_module_process((char *) module->filename, module);
|
||||
}
|
||||
|
||||
@ -511,7 +511,7 @@ SWITCH_DECLARE(void) switch_loadable_module_shutdown(void)
|
||||
for (hi = switch_hash_first(loadable_modules.pool, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
module = (switch_loadable_module_t *) val;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Checking %s\t", module->interface->module_name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Checking %s\t", module->module_interface->module_name);
|
||||
if (module->switch_module_shutdown) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_CONSOLE, "(yes)\n");
|
||||
module->switch_module_shutdown();
|
||||
|
Loading…
Reference in New Issue
Block a user