add new macros and approach to module loader.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5337 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2007-06-13 14:35:55 +00:00
1 parent 7239a56f00
commit 14608093b1
7 files changed
+89 -74

No files matched your search

+6 -2
View File
@@ -38,6 +38,10 @@
#include "mod_sofia.h"
SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load);
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sofia_shutdown);
SWITCH_MODULE_DEFINITION(mod_sofia, mod_sofia_load, mod_sofia_shutdown, NULL);
struct mod_sofia_globals mod_sofia_globals;
const switch_endpoint_interface_t sofia_endpoint_interface;
static switch_frame_t silence_frame = { 0 };
@@ -1497,7 +1501,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
return cause;
}
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
{
silence_frame.data = silence_data;
@@ -1575,7 +1579,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
}
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sofia_shutdown)
{
int sanity = 0;
+1 -1
View File
@@ -45,7 +45,7 @@
#include <switch_odbc.h>
#endif
static const char modname[] = "mod_sofia";
#define MODNAME "mod_sofia"
static const switch_state_handler_table_t noop_state_handler = { 0 };
struct sofia_gateway;
typedef struct sofia_gateway sofia_gateway_t;
+1 -1
View File
@@ -1931,7 +1931,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
from_user,
profile->dialplan,
displayname, from_user, network_ip, NULL, NULL, NULL, modname, context, destination_number);
displayname, from_user, network_ip, NULL, NULL, NULL, MODNAME, context, destination_number);
if (tech_pvt->caller_profile) {