]> git.mxchange.org Git - hub.git/commitdiff
Support for non-regular ports added
authorRoland Häder <roland@mxchange.org>
Tue, 6 Jul 2010 15:45:34 +0000 (15:45 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 6 Jul 2010 15:45:34 +0000 (15:45 +0000)
application/hub/main/discovery/package/class_PackageRecipientDiscovery.php

index ad062049dae60729e043b1b77703e22ff91cfd05..d2dfcb6d2ea52a4a6d49bfd15172680d8205c4a0 100644 (file)
@@ -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);