FS-5761 --resolve this solution is sufficient
This commit is contained in:
parent
f613105a25
commit
5f29412021
|
@ -47,7 +47,6 @@
|
||||||
#define DEFAULT_FEC_SPAN 3
|
#define DEFAULT_FEC_SPAN 3
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
int NEXT_ID;
|
|
||||||
int REF_COUNT;
|
int REF_COUNT;
|
||||||
int THREADCOUNT;
|
int THREADCOUNT;
|
||||||
switch_memory_pool_t *pool;
|
switch_memory_pool_t *pool;
|
||||||
|
@ -223,8 +222,6 @@ switch_status_t modem_init(modem_t *modem, modem_control_handler_t control_handl
|
||||||
#endif
|
#endif
|
||||||
logging_state_t *logging;
|
logging_state_t *logging;
|
||||||
|
|
||||||
memset(modem, 0, sizeof(*modem));
|
|
||||||
|
|
||||||
modem->master = -1;
|
modem->master = -1;
|
||||||
modem->slave = -1;
|
modem->slave = -1;
|
||||||
|
|
||||||
|
@ -298,8 +295,6 @@ switch_status_t modem_init(modem_t *modem, modem_control_handler_t control_handl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
modem->slot = globals.NEXT_ID++;
|
|
||||||
|
|
||||||
snprintf(modem->devlink, sizeof(modem->devlink), "%s/FS%d", spandsp_globals.modem_directory, modem->slot);
|
snprintf(modem->devlink, sizeof(modem->devlink), "%s/FS%d", spandsp_globals.modem_directory, modem->slot);
|
||||||
|
|
||||||
unlink(modem->devlink);
|
unlink(modem->devlink);
|
||||||
|
@ -1351,11 +1346,12 @@ static void activate_modems(void)
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
switch_mutex_lock(globals.mutex);
|
switch_mutex_lock(globals.mutex);
|
||||||
memset(globals.MODEM_POOL, 0, MAX_MODEMS);
|
memset(globals.MODEM_POOL, 0, sizeof(globals.MODEM_POOL));
|
||||||
for (x = 0; x < max; x++) {
|
for (x = 0; x < max; x++) {
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Starting Modem SLOT %d\n", x);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Starting Modem SLOT %d\n", x);
|
||||||
|
|
||||||
|
globals.MODEM_POOL[x].slot = x;
|
||||||
launch_modem_thread(&globals.MODEM_POOL[x]);
|
launch_modem_thread(&globals.MODEM_POOL[x]);
|
||||||
}
|
}
|
||||||
switch_mutex_unlock(globals.mutex);
|
switch_mutex_unlock(globals.mutex);
|
||||||
|
|
Loading…
Reference in New Issue