From: Roland Häder Date: Mon, 3 Aug 2009 18:26:50 +0000 (+0000) Subject: Updated to latest core changes (encapsulated ) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5588d09684ca3604994fb5f64c209870ee5ddcaa;p=hub.git Updated to latest core changes (encapsulated ) --- diff --git a/application/hub/init.php b/application/hub/init.php index 915f478b4..32d4ab3bc 100644 --- a/application/hub/init.php +++ b/application/hub/init.php @@ -49,7 +49,7 @@ require($cfg->getConfigEntry('base_path') . 'inc/language.php'); require($cfg->getConfigEntry('base_path') . 'inc/database.php'); // Get's our IP address -$_SERVER['SERVER_ADDR'] = ConsoleTools::acquireSelfIPAddress(); +ConsoleTools::acquireSelfIPAddress(); // [EOF] ?> diff --git a/application/hub/main/nodes/boot/class_HubBootNode.php b/application/hub/main/nodes/boot/class_HubBootNode.php index 7696c1bea..828188975 100644 --- a/application/hub/main/nodes/boot/class_HubBootNode.php +++ b/application/hub/main/nodes/boot/class_HubBootNode.php @@ -59,7 +59,7 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable { */ public function doBootstrapping () { // Now check if the IP address matches one of the bootstrap nodes - if ($this->ifAddressMatchesBootstrappingNodes($_SERVER['SERVER_ADDR'])) { + if ($this->ifAddressMatchesBootstrappingNodes($this->getConfigInstance()->getServerAddress())) { // Get our port from configuration $ourPort = $this->getConfigInstance()->getConfigEntry('node_tcp_listen_port'); @@ -81,11 +81,11 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable { } } else { // IP does match, but no port - $this->debugOutput('BOOTSTRAP: WARNING: Our IP ' . $_SERVER['SERVER_ADDR'] . ' does match a known bootstrap-node but not the port ' . $ourPort . '/' . $bootPort . '.'); + $this->debugOutput('BOOTSTRAP: WARNING: Our IP ' . $this->getConfigInstance()->getServerAddress() . ' does match a known bootstrap-node but not the port ' . $ourPort . '/' . $bootPort . '.'); } } else { // Node does not match any know bootstrap-node - $this->debugOutput('BOOTSTRAP: WARNING: Our IP ' . $_SERVER['SERVER_ADDR'] . ' does not match any known bootstrap-nodes.'); + $this->debugOutput('BOOTSTRAP: WARNING: Our IP ' . $this->getConfigInstance()->getServerAddress() . ' does not match any known bootstrap-nodes.'); } // This might not be all...