freetdm: crash on assert
This commit is contained in:
parent
80363af697
commit
9a26e0cc2b
|
@ -87,6 +87,7 @@ static struct {
|
||||||
analog_option_t analog_options;
|
analog_option_t analog_options;
|
||||||
switch_hash_t *ss7_configs;
|
switch_hash_t *ss7_configs;
|
||||||
int sip_headers;
|
int sip_headers;
|
||||||
|
uint8_t crash_on_assert;
|
||||||
} globals;
|
} globals;
|
||||||
|
|
||||||
/* private data attached to each fs session */
|
/* private data attached to each fs session */
|
||||||
|
@ -2389,6 +2390,8 @@ static switch_status_t load_config(void)
|
||||||
globals.debug = atoi(val);
|
globals.debug = atoi(val);
|
||||||
} else if (!strcasecmp(var, "hold-music")) {
|
} else if (!strcasecmp(var, "hold-music")) {
|
||||||
switch_set_string(globals.hold_music, val);
|
switch_set_string(globals.hold_music, val);
|
||||||
|
} else if (!strcasecmp(var, "crash-on-assert")) {
|
||||||
|
globals.crash_on_assert = switch_true(val);
|
||||||
} else if (!strcasecmp(var, "sip-headers")) {
|
} else if (!strcasecmp(var, "sip-headers")) {
|
||||||
globals.sip_headers = switch_true(val);
|
globals.sip_headers = switch_true(val);
|
||||||
} else if (!strcasecmp(var, "enable-analog-option")) {
|
} else if (!strcasecmp(var, "enable-analog-option")) {
|
||||||
|
@ -3358,6 +3361,10 @@ static switch_status_t load_config(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (globals.crash_on_assert) {
|
||||||
|
ftdm_log(FTDM_LOG_WARNING, "Crash on assert enabled\n");
|
||||||
|
ftdm_global_set_crash_policy(FTDM_CRASH_ON_ASSERT);
|
||||||
|
}
|
||||||
|
|
||||||
switch_xml_free(xml);
|
switch_xml_free(xml);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue