From 6ba99c6199ea99b8abbb0fa09d334efaba42cb9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 7 Jul 2009 20:00:31 +0000 Subject: [PATCH] More debug --- application/hub/main/nodes/boot/class_HubBootNode.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/hub/main/nodes/boot/class_HubBootNode.php b/application/hub/main/nodes/boot/class_HubBootNode.php index fa8c5064a..a6b1779e6 100644 --- a/application/hub/main/nodes/boot/class_HubBootNode.php +++ b/application/hub/main/nodes/boot/class_HubBootNode.php @@ -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 -- 2.39.5