(MDXMLINT-36) don't add module interfaces before returning from error conditions in module load functions

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10072 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-10-19 23:58:43 +00:00
parent 9f70152968
commit 78fe4073e1
4 changed files with 13 additions and 16 deletions

View File

@@ -1458,6 +1458,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_shout_load)
curl_global_init(CURL_GLOBAL_ALL);
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
file_interface->interface_name = modname;
@@ -1470,16 +1471,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_shout_load)
file_interface->file_set_string = shout_file_set_string;
file_interface->file_get_string = shout_file_get_string;
/* connect my internal structure to the blank pointer passed to me */
//*module_interface = &shout_module_interface;
shout_init();
mpg123_init();
load_config();
SWITCH_ADD_API(shout_api_interface, "telecast", "telecast", telecast_api_function, TELECAST_SYNTAX);
load_config();
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}