]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php
Continued rewriting:
[hub.git] / application / hub / main / discovery / recipient / package / class_PackageRecipientDiscovery.php
index 9fa8fe942381eeac1227c4bed36cfc590bf7d7da..dbde1508d660dda23cdb0b2446deec74bd4e9eb9 100644 (file)
@@ -98,18 +98,19 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov
                $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_listen_port'))) || ($recipient[0] == $this->getConfigInstance()->getServerAddress())) {
+               if ((($recipient[0] == HubTools::determineOwnExternalAddress()) && ($recipient[1] == $this->getConfigInstance()->getConfigEntry('node_listen_port'))) || ($recipient[0] == $this->getConfigInstance()->getServerAddress())) {
                        /*
-                        * Is same as own external IP + TCP/UDP listen port or internal IP, don't do anything here so other
-                        * classes found an empty recipient list for internal (own) handling
-                        * of the original content.
+                        * Is same as own external address + TCP/UDP listen port or
+                        * internal address, don't do anything here so other classes found
+                        * an empty recipient list for internal (own) handling of the
+                        * original content.
                         */
 
                        // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $recipient[0] . ' matches own ip (' .  HubTools::determineOwnExternalIp() . ' or ' . $this->getConfigInstance()->getServerAddress() . ')');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $recipient[0] . ' matches own ip (' .  HubTools::determineOwnExternalAddress() . ' or ' . $this->getConfigInstance()->getServerAddress() . ')');
                } else {
                        // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $recipient[0] . ' is different than own external ip (' .  HubTools::determineOwnExternalIp() . ') nor internal ip (' . $this->getConfigInstance()->getServerAddress() . '), need to forward (not yet implemented)!');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $recipient[0] . ' is different than own external address (' .  HubTools::determineOwnExternalAddress() . ') nor internal address (' . $this->getConfigInstance()->getServerAddress() . '), need to forward (not yet implemented)!');
 
                        // This package is to be delivered to someone else, so add it
                        $this->getListInstance()->addEntry('unl', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);