]> git.mxchange.org Git - hub.git/commitdiff
Getter for bootIpPort added
authorRoland Häder <roland@mxchange.org>
Tue, 7 Jul 2009 20:03:02 +0000 (20:03 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 7 Jul 2009 20:03:02 +0000 (20:03 +0000)
application/hub/main/nodes/boot/class_HubBootNode.php
application/hub/main/nodes/class_BaseHubNode.php

index a6b1779e6ce860158f7cfbcc4e1e8cd9c92349d6..9e54dec392f90139a30650f249dbe11a717b8dac 100644 (file)
@@ -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') {
index 0823e5bc47daa6e6f91bf46e5b526bb5a33321ae..0fb14b215f01f07053c3c9b01cc7e0b537ea6c66 100644 (file)
@@ -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
         *