]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php
Updated 'core'.
[hub.git] / application / hub / main / discovery / recipient / package / class_PackageRecipientDiscovery.php
index f878eb772814ea56433ece8853fb3302a16f7fab..72e8794004483b9de45848c955d72e877a53455d 100644 (file)
@@ -97,7 +97,7 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov
                $handlerInstance = ProtocolHandlerFactory::createProtocolHandlerFromPackageData($decodedData);
 
                // Is the 'recipient' field same as this peer's IP?
-               if ($handlerInstance->isOwnAddress()) {
+               if ($handlerInstance->isOwnAddress($decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) {
                        /*
                         * Is same as own external address + TCP/UDP listen port or
                         * internal address, don't do anything here so other classes found
@@ -106,10 +106,10 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov
                         */
 
                        // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient matches own ip (external=' .  HubTools::determineOwnExternalAddress() . ' or internal=' . HubTools::determineOwnInternalAddress() . ')');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ' matches own ip (external=' .  HubTools::determineOwnExternalAddress() . ' or internal=' . HubTools::determineOwnInternalAddress() . ')');
                } else {
                        // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient is different than own external address (' .  HubTools::determineOwnExternalAddress() . ') nor internal address (' . HubTools::determineOwnInternalAddress() . '), need to forward (not yet implemented)!');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ' is different than own external address (' .  HubTools::determineOwnExternalAddress() . ') nor internal address (' . HubTools::determineOwnInternalAddress() . '), need to forward (not yet implemented)!');
 
                        // This package is to be delivered to someone else, so add it
                        // @TODO Unfinished: $this->getListInstance()->addEntry('unl', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);