提交 8a0c5152 authored 作者: Ken Rice's avatar Ken Rice

FS-4906 --resolve

上级 ab9d77b4
......@@ -492,6 +492,7 @@ switch_status_t load_configuration(switch_bool_t reload)
spandsp_globals.modem_dialplan = "XML";
spandsp_globals.modem_context = "default";
spandsp_globals.modem_directory = "/dev";
spandsp_globals.modem_count = 0;
......@@ -532,6 +533,8 @@ switch_status_t load_configuration(switch_bool_t reload)
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%d] for total-modems\n", tmp);
}
} else if (!strcmp(name, "directory")) {
spandsp_globals.modem_directory = switch_core_strdup(spandsp_globals.config_pool, value);
} else if (!strcmp(name, "dialplan")) {
spandsp_globals.modem_dialplan = switch_core_strdup(spandsp_globals.config_pool, value);
} else if (!strcmp(name, "context")) {
......
......@@ -74,6 +74,7 @@ struct spandsp_globals {
int modem_verbose;
char *modem_context;
char *modem_dialplan;
char *modem_directory;
switch_hash_t *tones;
int tonedebug;
};
......
......@@ -299,7 +299,8 @@ switch_status_t modem_init(modem_t *modem, modem_control_handler_t control_handl
#ifndef WIN32
modem->slot = globals.NEXT_ID++;
snprintf(modem->devlink, sizeof(modem->devlink), "/dev/FS%d", modem->slot);
snprintf(modem->devlink, sizeof(modem->devlink), "%s/FS%d", spandsp_globals.modem_directory, modem->slot);
unlink(modem->devlink);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论