From aefe3287719830b53f26d1c3f42ad043c47a9c02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 7 Jul 2009 20:03:02 +0000 Subject: [PATCH] Getter for bootIpPort added --- application/hub/main/nodes/boot/class_HubBootNode.php | 4 ++-- application/hub/main/nodes/class_BaseHubNode.php | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) 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 * -- 2.39.5