From 39a16b96ed7162813793f705a9575605472b66ab Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 19 Feb 2015 11:41:36 +0100 Subject: [PATCH] Lesser noisy debug messages + updated 'core'. Signed-off-by: Roland Haeder --- .../recipient/package/class_PackageRecipientDiscovery.php | 7 +++---- .../main/handler/protocol/class_BaseProtocolHandler.php | 4 ++-- application/hub/main/package/class_NetworkPackage.php | 8 ++++---- core | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php index 8c2035736..27baacd2c 100644 --- a/application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php +++ b/application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php @@ -106,15 +106,14 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov */ // Debug output (may flood) - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient matches own ip (' . HubTools::determineOwnExternalAddress() . ' or ' . $this->getConfigInstance()->getServerAddress() . ')'); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient matches own ip (' . HubTools::determineOwnExternalAddress() . ' or ' . 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 (' . $this->getConfigInstance()->getServerAddress() . '), need to forward (not yet implemented)!'); + /* 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)!'); // This package is to be delivered to someone else, so add it - //$this->getListInstance()->addEntry('unl', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]); + // @TODO Unfinished: $this->getListInstance()->addEntry('unl', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]); } - die(__METHOD__ . ': Unfinished!' . PHP_EOL); } } diff --git a/application/hub/main/handler/protocol/class_BaseProtocolHandler.php b/application/hub/main/handler/protocol/class_BaseProtocolHandler.php index 3caf1ef79..5be57dc74 100644 --- a/application/hub/main/handler/protocol/class_BaseProtocolHandler.php +++ b/application/hub/main/handler/protocol/class_BaseProtocolHandler.php @@ -185,14 +185,14 @@ class BaseProtocolHandler extends BaseHandler { $internalUnl = HubTools::determineOwnInternalAddress(); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: currentUnl=' . $currentUnl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: currentUnl=' . $currentUnl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl); //* DIE-DEBUG: */ die(__METHOD__.':currentUnl=' . $currentUnl . ',this='.print_r($this, TRUE)); // Is it the same? $ifMatches = (($currentUnl === $externalUnl) || ($currentUnl === $internalUnl)); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: ifMatches=' . intval($ifMatches)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: ifMatches=' . intval($ifMatches)); // Return result return $ifMatches; diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index b76e6e818..d8d7e090b 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -827,7 +827,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R */ public function sendWaitingPackage () { // Debug message - /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!'); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!'); // Sanity check if we have packages waiting for delivery if (!$this->isPackageWaitingForDelivery()) { @@ -854,7 +854,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R } // Debug message - /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!'); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!'); } /** @@ -864,7 +864,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R */ public function sendEncodedData () { // Debug message - /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!'); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': CALLED!'); // Make sure there is pending encoded data assert($this->isEncodedDataPending()); @@ -927,7 +927,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R $this->getStackInstance()->pushNamed(self::STACKER_NAME_OUTGOING_STREAM, $encodedDataArray); // Debug message - /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!'); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ': EXIT!'); } /////////////////////////////////////////////////////////////////////////// diff --git a/core b/core index f4b9cbebe..65892e399 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit f4b9cbebe8ad3c6be3a6292c9f227dc04dc43667 +Subproject commit 65892e399a9ad6818cafc386c83a585f39dc1fb1 -- 2.39.2