Lets make the parser free its stuff on shutdown, and let the callbacks do something if required

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12467 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene
2009-03-05 16:57:26 +00:00
parent 093d867d89
commit fdab1b11d1
3 changed files with 50 additions and 4 deletions

View File

@@ -55,14 +55,15 @@ static struct {
int integer;
} globals;
static switch_status_t config_callback_siptrace(switch_xml_config_item_t *data, switch_bool_t changed)
static switch_status_t config_callback_siptrace(switch_xml_config_item_t *data, switch_config_callback_type_t callback_type, switch_bool_t changed)
{
switch_bool_t value = *(switch_bool_t*)data->ptr;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "In siptrace callback: value %s changed %s\n",
value ? "true" : "false", changed ? "true" : "false");
/*
if (changed) {
if ((callback_type == CONFIG_LOG || callback_type == CONFIG_RELOAD) && changed) {
nua_set_params(((sofia_profile_t*)data->functiondata)->nua, TPTAG_LOG(value), TAG_END());
}
*/
@@ -143,6 +144,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_skel_load)
Macro expands to: switch_status_t mod_skel_shutdown() */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skel_shutdown)
{
/* Cleanup dynamically allocated config settings */
switch_xml_config_cleanup(instructions);
return SWITCH_STATUS_SUCCESS;
}