]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/discovery/package/class_PackageRecipientDiscovery.php
While self-connect is running, it might be already announced which is fine
[hub.git] / application / hub / main / discovery / package / class_PackageRecipientDiscovery.php
index 7ed996ca300864f6f20e68db2b1dc2d22a245941..a5cd4e144f0ebd63ce2512d199e5d6e001c9fd4a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @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]);