allow 0
This commit is contained in:
parent
54ddef0bd4
commit
6fc10ffbf6
|
@ -288,7 +288,7 @@ switch_status_t load_configuration(switch_bool_t reload)
|
|||
|
||||
spandsp_globals.modem_dialplan = "XML";
|
||||
spandsp_globals.modem_context = "default";
|
||||
spandsp_globals.modem_count = 1;
|
||||
spandsp_globals.modem_count = 0;
|
||||
|
||||
|
||||
spandsp_globals.enable_t38 = 1;
|
||||
|
@ -324,7 +324,7 @@ switch_status_t load_configuration(switch_bool_t reload)
|
|||
if (!reload && !strcmp(name, "total-modems")) {
|
||||
int tmp = atoi(value);
|
||||
|
||||
if (tmp > 0 && tmp < MAX_MODEMS) {
|
||||
if (tmp > -1 && tmp < MAX_MODEMS) {
|
||||
spandsp_globals.modem_count = tmp;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%d] for total-modems\n", tmp);
|
||||
|
@ -533,9 +533,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_spandsp_init)
|
|||
/* Not such severe to prevent loading */
|
||||
}
|
||||
|
||||
#if defined(MODEM_SUPPORT)
|
||||
//#if defined(MODEM_SUPPORT)
|
||||
modem_global_init(module_interface, pool);
|
||||
#endif
|
||||
//#endif
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "mod_spandsp loaded, using spandsp library version [%s]\n", SPANDSP_RELEASE_DATETIME_STRING);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
|
|
@ -1232,11 +1232,8 @@ switch_status_t modem_global_init(switch_loadable_module_interface_t **module_in
|
|||
{
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
globals.pool = pool;
|
||||
globals.SOFT_MAX_MODEMS = 1;
|
||||
|
||||
if (spandsp_globals.modem_count > 0) {
|
||||
globals.SOFT_MAX_MODEMS = spandsp_globals.modem_count;
|
||||
}
|
||||
globals.SOFT_MAX_MODEMS = spandsp_globals.modem_count;
|
||||
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
|
||||
|
|
Loading…
Reference in New Issue