]> git.mxchange.org Git - hub.git/commitdiff
Swapped out seperator char for all boostrap nodes
authorRoland Häder <roland@mxchange.org>
Mon, 18 Apr 2011 19:44:56 +0000 (19:44 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 18 Apr 2011 19:44:56 +0000 (19:44 +0000)
application/hub/main/class_BaseHubSystem.php
application/hub/main/discovery/package/class_PackageRecipientDiscovery.php
application/hub/main/nodes/class_BaseHubNode.php

index bb5df64688ba06a950efd2bbacc5dde81603b7b9..9e61ae2b38ecdc9ebd73cc23a6f0876c972d62e1 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseHubSystem extends BaseFrameworkSystem {
+       /**
+        * Seperator for all bootstrap node entries
+        */
+       const BOOTSTRAP_NODES_SEPERATOR = ';';
+
        /**
         * An instance of a node
         */
index b4e5f21804f6cd314d7d9de76fa4d456200fb27b..bf591a84820f029c3dffb9e7cb987e3928c0ce88 100644 (file)
@@ -63,7 +63,7 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable
                        // All upper hubs, these are currently the bootstrap nodes and later on prepended list-nodes
                        case NetworkPackage::NETWORK_TARGET_UPPER_HUBS:
                                // Get all bootstrap nodes
-                               foreach (explode(';', $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $node) {
+                               foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPERATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $node) {
                                        // Add the entry
                                        $listInstance->addEntry('ip_port', $node);
                                } // END - foreach
index f3a244107719341c8d92ff1ecc039f68c1029aea..286fc00516b81f3362e7f918df250fd3ac16ee03 100644 (file)
@@ -206,7 +206,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                $isFound = false;
 
                // Run through all configured IPs
-               foreach (explode(',', $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {
+               foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPERATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {
                        // Split it up in IP/port
                        $ipPortArray = explode(':', $ipPort);