From: Roland Häder Date: Tue, 7 Jul 2009 20:03:02 +0000 (+0000) Subject: Getter for bootIpPort added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aefe3287719830b53f26d1c3f42ad043c47a9c02;p=hub.git Getter for bootIpPort added --- diff --git a/application/hub/main/nodes/boot/class_HubBootNode.php b/application/hub/main/nodes/boot/class_HubBootNode.php index a6b1779e6..9e54dec39 100644 --- a/application/hub/main/nodes/boot/class_HubBootNode.php +++ b/application/hub/main/nodes/boot/class_HubBootNode.php @@ -67,12 +67,12 @@ class HubBootNode extends BaseHubNode implements NodeHelper { $ourPort = $this->getConfigInstance()->readConfig('node_tcp_listen_port'); // Extract port - $bootPort = substr($this->bootIpPort, -strlen($ourPort), strlen($ourPort)); + $bootPort = substr($this->getBootIpPort(), -strlen($ourPort), strlen($ourPort)); // Is the port the same? if ($bootPort == $ourPort) { // It is the same! - $this->getDebugInstance()->output('BOOTSTRAP: IP/port matches bootstrapping node ' . $this->bootIpPort . '.'); + $this->getDebugInstance()->output('BOOTSTRAP: IP/port matches bootstrapping node ' . $this->getBootIpPort() . '.'); // Now, does the mode match (should be 'boot'!) if ($this->getRequestInstance()->getRequestElement('mode') == 'boot') { diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 0823e5bc4..0fb14b215 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -226,6 +226,15 @@ class BaseHubNode extends BaseHubSystem implements Updateable { } } + /** + * Getter for boot IP/port combination + * + * @return $bootIpPort The IP/port combination of the boot node + */ + protected final function getBootIpPort () { + return $this->bootIpPort; + } + /** * Initializes queues which every node needs *