]> git.mxchange.org Git - hub.git/commitdiff
Removed obsolete boot_node_foo_listen_port, you can now customize it in config-local.php
authorRoland Häder <roland@mxchange.org>
Wed, 20 Apr 2011 05:40:25 +0000 (05:40 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 20 Apr 2011 05:40:25 +0000 (05:40 +0000)
application/hub/config-local.php-dist
application/hub/config.php
application/hub/main/nodes/boot/class_HubBootNode.php
application/hub/main/nodes/class_BaseHubNode.php

index 4cbdceeb37b3b97b600edca122264f169e2442dc..b3fcab65c2b9500419bd6d2f300c0cdb2ecf4ca9 100644 (file)
@@ -45,12 +45,6 @@ $cfg->setConfigEntry('node_tcp_listen_port', 9060);
 // CFG: NODE-UDP-LISTEN-PORT
 $cfg->setConfigEntry('node_udp_listen_port', 9060);
 
-// CFG: BOOT-NODE-TCP-LISTEN-PORT
-$cfg->setConfigEntry('boot_node_tcp_listen_port', 9061);
-
-// CFG: BOOT-NODE-UDP-LISTEN-PORT
-$cfg->setConfigEntry('boot_node_udp_listen_port', 9061);
-
 // CFG: NODE-DEFAULT-MODE (can be 'regular', 'list', 'master' or 'boot', default is 'regular')
 $cfg->setConfigEntry('node_default_mode', 'regular');
 
index d359fd85ebe201d831b3dfdfd96dbd4abbd58882..3264f81f663aac9cda84c6811dd7a27d774b694f 100644 (file)
@@ -33,12 +33,6 @@ $cfg->setConfigEntry('node_tcp_listen_port', 9060);
 // CFG: NODE-UDP-LISTEN-PORT
 $cfg->setConfigEntry('node_udp_listen_port', 9060);
 
-// CFG: BOOT-NODE-TCP-LISTEN-PORT
-$cfg->setConfigEntry('boot_node_tcp_listen_port', 9061);
-
-// CFG: BOOT-NODE-UDP-LISTEN-PORT
-$cfg->setConfigEntry('boot_node_udp_listen_port', 9061);
-
 // CFG: NODE-DEFAULT-MODE (can be 'regular', 'list', 'master' or 'boot', default is 'regular')
 $cfg->setConfigEntry('node_default_mode', 'regular');
 
index 9b7de39253c5cace26aa371ec0bd61595954341c..28ba84eb0c17b537430c564c6c3ed3d67fbd323a 100644 (file)
@@ -61,7 +61,7 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable {
                // Now check if the IP address matches one of the bootstrap nodes
                if ($this->ifAddressMatchesBootstrappingNodes($this->getConfigInstance()->detectServerAddress())) {
                        // Get our port from configuration
-                       $ourPort = $this->getConfigInstance()->getConfigEntry('boot_node_tcp_listen_port');
+                       $ourPort = $this->getConfigInstance()->getConfigEntry('node_tcp_listen_port');
 
                        // Extract port
                        $bootPort = substr($this->getBootIpPort(), -strlen($ourPort), strlen($ourPort));
index c312de2bc340da00eec660844253f419a4e3465c..eace6673efe5db30033b1f624f8e223d0fec5ca1 100644 (file)
@@ -523,13 +523,12 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
 
                // Setup address and port
                $listenerInstance->setListenAddressByConfiguration('node_listen_addr');
-               if ($this instanceof HubBootNode) {
-                       // Bootstrap have different listening port
-                       $listenerInstance->setListenPortByConfiguration('boot_node_tcp_listen_port');
-               } else {
-                       // All other nodes use the default port
-                       $listenerInstance->setListenPortByConfiguration('node_tcp_listen_port');
-               }
+
+               /*
+                * All nodes can now use the same configuration entry because it can be
+                * customized in config-local.php.
+                */
+               $listenerInstance->setListenPortByConfiguration('node_tcp_listen_port');
 
                // Initialize the listener
                $listenerInstance->initListener();
@@ -551,13 +550,12 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
 
                // Setup address and port
                $listenerInstance->setListenAddressByConfiguration('node_listen_addr');
-               if ($this instanceof HubBootNode) {
-                       // Bootstrap have different listening port
-                       $listenerInstance->setListenPortByConfiguration('boot_node_udp_listen_port');
-               } else {
-                       // All other nodes use the default port
-                       $listenerInstance->setListenPortByConfiguration('node_udp_listen_port');
-               }
+
+               /*
+                * All nodes can now use the same configuration entry because it can be
+                * customized in config-local.php.
+                */
+               $listenerInstance->setListenPortByConfiguration('node_udp_listen_port');
 
                // Initialize the listener
                $listenerInstance->initListener();