From 48eeedba1e9d3aed98dd312964e74c9c6db42d11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 6 Jul 2010 15:45:34 +0000 Subject: [PATCH] Support for non-regular ports added --- .../package/class_PackageRecipientDiscovery.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php index ad062049d..d2dfcb6d2 100644 --- a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php +++ b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php @@ -74,8 +74,18 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable // Determine own external ip by connecting to my (coder) server at 217.172.186.31 $ip = ConsoleTools::determineExternalIp(); + // Get mode + $mode = Registry::getRegistry()->getInstance('app')->getRequestInstance()->getRequestElement('mode'); + + // Set prefix + $prefix = ''; + if ($mode != 'regular') { + // Is a special node + $prefix = $mode . '_'; + } // END - if + // Get port and add it - $ipPort = $ip . ':' . $this->getConfigInstance()->getConfigEntry('node_' . $this->determineProtocolByPackageData($packageData) . '_listen_port'); + $ipPort = $ip . ':' . $this->getConfigInstance()->getConfigEntry($prefix . 'node_' . $this->determineProtocolByPackageData($packageData) . '_listen_port'); // Add it to the list $listInstance->addEntry('ip_port', $ipPort); -- 2.39.5