Fixes #841 -- Include proper stations in available port calculations.

This commit is contained in:
Buster Neece 2019-07-03 10:26:36 -05:00
parent 4f84be3c61
commit 9727e07b76
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
1 changed files with 3 additions and 1 deletions

View File

@ -377,14 +377,16 @@ class Configuration
foreach($station_configs as $row) {
$station_reference = ['id' => $row['id'], 'name' => $row['name']];
if ($row['frontend_type'] !== Adapters::FRONTEND_REMOTE && $row['backend_type'] !== Adapters::BACKEND_NONE) {
if ($row['frontend_type'] !== Adapters::FRONTEND_REMOTE) {
$frontend_config = (array)$row['frontend_config'];
if (!empty($frontend_config['port'])) {
$port = (int)$frontend_config['port'];
$used_ports[$port] = $station_reference;
}
}
if ($row['backend_type'] !== Adapters::BACKEND_NONE) {
$backend_config = (array)$row['backend_config'];
// For DJ port, consider both the assigned port and port+1 to be reserved and in-use.