FS-4906 --resolve

This commit is contained in:
Ken Rice 2013-02-11 20:08:15 -06:00
parent ab9d77b456
commit 8a0c5152d7
3 changed files with 6 additions and 1 deletions

View File

@ -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")) {

View File

@ -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;
};

View File

@ -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);