X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fhub%2Fmain%2Fdiscovery%2Fpackage%2Fclass_PackageRecipientDiscovery.php;h=a5cd4e144f0ebd63ce2512d199e5d6e001c9fd4a;hb=e10aa2b808ead315a4b8924f7b2ec2cc349ff414;hp=7ed996ca300864f6f20e68db2b1dc2d22a245941;hpb=b52519b557d5c0b68eeb988a72770044c2737560;p=hub.git diff --git a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php index 7ed996ca3..a5cd4e144 100644 --- a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php +++ b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -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]);