From: Roland Häder Date: Mon, 18 Apr 2011 19:44:56 +0000 (+0000) Subject: Swapped out seperator char for all boostrap nodes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=810a1b85ba98e0fda206a580de1f635709ceeeab;p=hub.git Swapped out seperator char for all boostrap nodes --- diff --git a/application/hub/main/class_BaseHubSystem.php b/application/hub/main/class_BaseHubSystem.php index bb5df6468..9e61ae2b3 100644 --- a/application/hub/main/class_BaseHubSystem.php +++ b/application/hub/main/class_BaseHubSystem.php @@ -22,6 +22,11 @@ * along with this program. If not, see . */ class BaseHubSystem extends BaseFrameworkSystem { + /** + * Seperator for all bootstrap node entries + */ + const BOOTSTRAP_NODES_SEPERATOR = ';'; + /** * An instance of a node */ diff --git a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php index b4e5f2180..bf591a848 100644 --- a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php +++ b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php @@ -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 diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index f3a244107..286fc0051 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -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);