From: Roland Häder Date: Fri, 27 Apr 2012 20:33:52 +0000 (+0000) Subject: Use getServerAddress() instead of ConsoleTools X-Git-Url: https://git.mxchange.org/?p=hub.git;a=commitdiff_plain;h=6f4965697a2c136c2218d4fe7949a66e07b77b79 Use getServerAddress() instead of ConsoleTools --- diff --git a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php index 7ed996ca3..1d322a5fa 100644 --- a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php +++ b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php @@ -108,7 +108,7 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable $recipient = explode(':', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]); // Is the 'recipient' field same as this peer's IP? - if ((($recipient[0] == HubTools::determineOwnExternalIp()) && ($recipient[1] == $this->getConfigInstance()->getConfigEntry('node_tcp_listen_port'))) || ($recipient[0] == ConsoleTools::acquireSelfIPAddress())) { + if ((($recipient[0] == HubTools::determineOwnExternalIp()) && ($recipient[1] == $this->getConfigInstance()->getConfigEntry('node_tcp_listen_port'))) || ($recipient[0] == $this->getConfigInstance()->getServerAddress())) { /* * Is same as own external IP+TCP port or internal IP, don't do anything here so other * classes found an empty recipient list for internal (own) handling @@ -116,10 +116,10 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable */ // Debug output (may flood) - /* NOISY-DEBUG: */ $this->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $recipient[0] . ' matches own ip (' . HubTools::determineOwnExternalIp() . ' or ' . ConsoleTools::acquireSelfIPAddress() . ')'); + /* NOISY-DEBUG: */ $this->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $recipient[0] . ' matches own ip (' . HubTools::determineOwnExternalIp() . ' or ' . $this->getConfigInstance()->getServerAddress() . ')'); } else { // Debug output (may flood) - /* NOISY-DEBUG: */ $this->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $recipient[0] . ' is different than own external ip (' . HubTools::determineOwnExternalIp() . ') nor internal ip (' . ConsoleTools::acquireSelfIPAddress() . '), need to forward (not yet implemented)!'); + /* NOISY-DEBUG: */ $this->debugOutput('RECIPIENT-DISCOVERY: Recipient ' . $recipient[0] . ' is different than own external ip (' . HubTools::determineOwnExternalIp() . ') nor internal ip (' . $this->getConfigInstance()->getServerAddress() . '), need to forward (not yet implemented)!'); // This package is to be delivered to someone else, so add it $this->getListInstance()->addEntry('ip_port', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);