]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/discovery/package/class_PackageRecipientDiscovery.php
Rewrites, some more methods:
[hub.git] / application / hub / main / discovery / package / class_PackageRecipientDiscovery.php
index 896f5b4c6bcc50b5ab1b8ac3b5edcce440ac100f..6843d14b5a415ad5402ba64cb8449ff38b1fa78d 100644 (file)
@@ -85,7 +85,7 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable
                        // The target 'self' is always the external IP address!
                        case NetworkPackage::NETWORK_TARGET_SELF:
                                // Determine own port
-                               $port = $this->getConfigInstance()->getConfigEntry('node_' . $this->determineProtocolByPackageData($packageData) . '_listen_port');
+                               $port = $this->getConfigInstance()->getConfigEntry('node_listen_port');
 
                                // Determine IP or 'external_ip' if set
                                $ip = HubTools::determineOwnExternalIp();
@@ -142,9 +142,9 @@ 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] == $this->getConfigInstance()->getServerAddress())) {
+               if ((($recipient[0] == HubTools::determineOwnExternalIp()) && ($recipient[1] == $this->getConfigInstance()->getConfigEntry('node_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
+                        * 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.
                         */