*/
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
}
}