mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
FS-4906 --resolve
This commit is contained in:
parent
ab9d77b456
commit
8a0c5152d7
@ -492,6 +492,7 @@ switch_status_t load_configuration(switch_bool_t reload)
|
|||||||
|
|
||||||
spandsp_globals.modem_dialplan = "XML";
|
spandsp_globals.modem_dialplan = "XML";
|
||||||
spandsp_globals.modem_context = "default";
|
spandsp_globals.modem_context = "default";
|
||||||
|
spandsp_globals.modem_directory = "/dev";
|
||||||
spandsp_globals.modem_count = 0;
|
spandsp_globals.modem_count = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -532,6 +533,8 @@ switch_status_t load_configuration(switch_bool_t reload)
|
|||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%d] for total-modems\n", tmp);
|
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")) {
|
} else if (!strcmp(name, "dialplan")) {
|
||||||
spandsp_globals.modem_dialplan = switch_core_strdup(spandsp_globals.config_pool, value);
|
spandsp_globals.modem_dialplan = switch_core_strdup(spandsp_globals.config_pool, value);
|
||||||
} else if (!strcmp(name, "context")) {
|
} else if (!strcmp(name, "context")) {
|
||||||
|
@ -74,6 +74,7 @@ struct spandsp_globals {
|
|||||||
int modem_verbose;
|
int modem_verbose;
|
||||||
char *modem_context;
|
char *modem_context;
|
||||||
char *modem_dialplan;
|
char *modem_dialplan;
|
||||||
|
char *modem_directory;
|
||||||
switch_hash_t *tones;
|
switch_hash_t *tones;
|
||||||
int tonedebug;
|
int tonedebug;
|
||||||
};
|
};
|
||||||
|
@ -299,7 +299,8 @@ switch_status_t modem_init(modem_t *modem, modem_control_handler_t control_handl
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
modem->slot = globals.NEXT_ID++;
|
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);
|
unlink(modem->devlink);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user