]> git.mxchange.org Git - hub.git/commitdiff
More debug
authorRoland Häder <roland@mxchange.org>
Tue, 7 Jul 2009 20:00:31 +0000 (20:00 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 7 Jul 2009 20:00:31 +0000 (20:00 +0000)
application/hub/main/nodes/boot/class_HubBootNode.php

index fa8c5064a2335d175527caa693b49bac3bfb7b12..a6b1779e6ce860158f7cfbcc4e1e8cd9c92349d6 100644 (file)
@@ -66,8 +66,11 @@ class HubBootNode extends BaseHubNode implements NodeHelper {
                        // Get our port from configuration
                        $ourPort = $this->getConfigInstance()->readConfig('node_tcp_listen_port');
 
+                       // Extract port
+                       $bootPort = substr($this->bootIpPort, -strlen($ourPort), strlen($ourPort));
+
                        // Is the port the same?
-                       if (substr($this->bootIpPort, -strlen($ourPort), strlen($ourPort)) == $ourPort) {
+                       if ($bootPort == $ourPort) {
                                // It is the same!
                                $this->getDebugInstance()->output('BOOTSTRAP: IP/port matches bootstrapping node ' . $this->bootIpPort . '.');
 
@@ -81,7 +84,7 @@ class HubBootNode extends BaseHubNode implements NodeHelper {
                                }
                        } else {
                                // IP does match, but no port
-                               $this->getDebugInstance()->output('BOOTSTRAP: WARNING: Our IP ' . $_SERVER['SERVER_ADDR'] . ' does match a known bootstrap-node but not the port ' . $ourPort . '.');
+                               $this->getDebugInstance()->output('BOOTSTRAP: WARNING: Our IP ' . $_SERVER['SERVER_ADDR'] . ' does match a known bootstrap-node but not the port ' . $ourPort . '/' . $bootPort . '.');
                        }
                } else {
                        // Node does not match any know bootstrap-node