[Freeswitch-svn] [commit] r10715 - in freeswitch/trunk: conf/autoload_configs src/mod/endpoints/mod_sofia
FreeSWITCH SVN
brian at freeswitch.org
Thu Dec 11 12:16:33 PST 2008
Author: brian
Date: Thu Dec 11 15:16:32 2008
New Revision: 10715
Log:
option to turn of auto_restart of sofia profiles on ip change
Modified:
freeswitch/trunk/conf/autoload_configs/sofia.conf.xml
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
Modified: freeswitch/trunk/conf/autoload_configs/sofia.conf.xml
==============================================================================
--- freeswitch/trunk/conf/autoload_configs/sofia.conf.xml (original)
+++ freeswitch/trunk/conf/autoload_configs/sofia.conf.xml Thu Dec 11 15:16:32 2008
@@ -2,6 +2,8 @@
<global_settings>
<param name="log-level" value="0"/>
+ <!-- <param name="auto-restart" value="false"/> -->
+ <param name="debug-presence" value="0"/>
</global_settings>
<!--
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Thu Dec 11 15:16:32 2008
@@ -2686,7 +2686,7 @@
{
const char *cond = switch_event_get_header(event, "condition");
- if (cond && !strcmp(cond, "network-address-change")) {
+ if (cond && !strcmp(cond, "network-address-change") && mod_sofia_globals.auto_restart) {
sofia_glue_restart_all_profiles();
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Thu Dec 11 15:16:32 2008
@@ -243,6 +243,7 @@
switch_event_node_t *custom_node;
switch_event_node_t *mwi_node;
int debug_presence;
+ int auto_restart;
};
extern struct mod_sofia_globals mod_sofia_globals;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Thu Dec 11 15:16:32 2008
@@ -1571,6 +1571,8 @@
goto done;
}
+ mod_sofia_globals.auto_restart = SWITCH_TRUE;
+
if ((settings = switch_xml_child(cfg, "global_settings"))) {
for (param = switch_xml_child(settings, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
@@ -1579,6 +1581,8 @@
su_log_set_level(NULL, atoi(val));
} else if (!strcasecmp(var, "debug-presence")) {
mod_sofia_globals.debug_presence = atoi(val);
+ } else if (!strcasecmp(var, "auto-restart")) {
+ mod_sofia_globals.auto_restart = switch_true(val);
}
}
}
More information about the Freeswitch-svn
mailing list