]> git.mxchange.org Git - hub.git/commitdiff
Updated to latest core changes (encapsulated )
authorRoland Häder <roland@mxchange.org>
Mon, 3 Aug 2009 18:26:50 +0000 (18:26 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 3 Aug 2009 18:26:50 +0000 (18:26 +0000)
application/hub/init.php
application/hub/main/nodes/boot/class_HubBootNode.php

index 915f478b4af4189c12f86bf3e2bd352cfd41c835..32d4ab3bc4e9c75cec21e43f9f6477990f3194bd 100644 (file)
@@ -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]
 ?>
index 7696c1bea7e49008bac7be4a099a8fa1b8e3adc7..828188975e0485d37c71898f860fa6747119de60 100644 (file)
@@ -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...