]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/recipient/self/class_SelfRecipient.php
A lot changes for refacturing protocol handler
[hub.git] / application / hub / main / recipient / self / class_SelfRecipient.php
index d3262368e388dfcbdc443b6a5d7410e274a2b565..7c2f8f51dc8679f84bf7720828cf0534eec9a94e 100644 (file)
@@ -57,21 +57,17 @@ class SelfRecipient extends BaseRecipient implements Recipient {
         */
        public function resolveRecipient ($recipient, Listable $listInstance, array $packageData) {
                // Make sure the recipient is valid
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SELF-RECIPIENT: recipient=' . $recipient);
-               // @TODO Unfinished
-               die(__METHOD__ . 'recipient=:' . print_r($recipient, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SELF-RECIPIENT[' . __METHOD__ . ':' . __LINE__ . ']: recipient=' . $recipient);
+               // @TODO Add more checks on data
                assert($recipient == NetworkPackage::NETWORK_TARGET_SELF);
 
-               // Determine own port
-               $port = $this->getConfigInstance()->getConfigEntry('node_listen_port');
-
                // Determine IP or 'external_address' if set
-               $ip = HubTools::determineOwnExternalAddress();
+               $unl = HubTools::determineOwnExternalAddress();
 
                // Is it not empty?
-               if (!empty($ip)) {
+               if (!empty($unl)) {
                        // Add it to the list
-                       $listInstance->addEntry('unl', $ip . ':' . $port);
+                       $listInstance->addEntry('unl', $unl);
                } // END - if
        }
 }