From bbee34e03d9a65cb54d32f8d18a57104878bfa67 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 29 Oct 2020 16:36:31 +0100 Subject: [PATCH] Continued: - commented out noisy debug lines - fixed mixing of content tags and content hash - updated core framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../handler/chunks/class_ChunkHandler.php | 12 ++++---- .../package/class_NetworkPackageHandler.php | 13 ++++---- .../package/deliverable/class_PackageData.php | 24 +++++++++++++++ .../class_NetworkPackageReaderTask.php | 30 +++++++++---------- .../class_NetworkPackageWriterTask.php | 22 +++++++------- .../decoder/class_NodePackageDecoderTask.php | 10 +++---- ...class_UnexpectedPackageStatusException.php | 2 +- core | 2 +- 8 files changed, 70 insertions(+), 45 deletions(-) diff --git a/application/hub/classes/handler/chunks/class_ChunkHandler.php b/application/hub/classes/handler/chunks/class_ChunkHandler.php index 4e43cb762..f27d4ed55 100644 --- a/application/hub/classes/handler/chunks/class_ChunkHandler.php +++ b/application/hub/classes/handler/chunks/class_ChunkHandler.php @@ -538,11 +538,11 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera */ public function ifUnhandledChunksWithFinalAvailable () { // Simply check if the stacker is not empty - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: CALLED!'); $unhandledChunks = $this->getStackInstance()->isStackEmpty(self::STACKER_NAME_CHUNKS_WITH_FINAL_EOP) === FALSE; // Return result - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CHUNK-HANDLER: unhandledChunks=%d - EXIT!', intval($unhandledChunks))); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CHUNK-HANDLER: unhandledChunks=%d - EXIT!', intval($unhandledChunks))); return $unhandledChunks; } @@ -619,11 +619,11 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera */ public function ifUnassembledChunksAvailable () { // For now do only check the array element 'is_complete' - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: CALLED!'); $unassembledChunksAvailable = ($this->finalPackageChunks['is_complete'] === TRUE); // Return status - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CHUNK-HANDLER: unassembledChunksAvailable=%d - EXIT!', intval($unassembledChunksAvailable))); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CHUNK-HANDLER: unassembledChunksAvailable=%d - EXIT!', intval($unassembledChunksAvailable))); return $unassembledChunksAvailable; } @@ -695,11 +695,11 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera */ public function ifRawPackageDataIsAvailable () { // Check it - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: this->rawPackageData()=' . strlen($this->rawPackageData) . ',ifUnassembledChunksAvailable()=' . intval($this->ifUnassembledChunksAvailable())); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: this->rawPackageData()=' . strlen($this->rawPackageData) . ',ifUnassembledChunksAvailable()=' . intval($this->ifUnassembledChunksAvailable())); $isRawPackageDataAvailable = ((!empty($this->rawPackageData)) && (!$this->ifUnassembledChunksAvailable())); // Return it - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: isRawPackageDataAvailable=' . intval($isRawPackageDataAvailable)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CHUNK-HANDLER: isRawPackageDataAvailable=' . intval($isRawPackageDataAvailable)); return $isRawPackageDataAvailable; } diff --git a/application/hub/classes/handler/package/class_NetworkPackageHandler.php b/application/hub/classes/handler/package/class_NetworkPackageHandler.php index 7461de36d..03a5073b1 100644 --- a/application/hub/classes/handler/package/class_NetworkPackageHandler.php +++ b/application/hub/classes/handler/package/class_NetworkPackageHandler.php @@ -775,6 +775,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei } // END - if // Check validity + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: packageInstance->senderId=%s,packageInstance->packageContent=%s,packageInstance->contentHash=%s', $packageInstance->getSenderId(), $packageInstance->getPackageContent(), $packageInstance->getContentHash())); $isHashValid = FrameworkFeature::callFeature('hubcoin_reward', 'checkHash', array( sprintf('%s:%s:%s', $packageInstance->getSenderId(), @@ -785,7 +786,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei )); // Return it - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: isHashValid=' . intval($isHashValid) . ' - EXIT!'); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: isHashValid=%s - EXIT!', intval($isHashValid))); return $isHashValid; } @@ -1453,7 +1454,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei // Package data (aka "message") in BASE64-decoded form but still compressed $packageInstance->setContentMessage(base64_decode($decodedContent[self::INDEX_PACKAGE_DATA])); // Tags as an indexed array for "tagging" the message - $packageInstance->setContentHash(explode(self::PACKAGE_TAGS_SEPARATOR, $decodedContent[self::INDEX_TAGS])); + $packageInstance->setContentTags(explode(self::PACKAGE_TAGS_SEPARATOR, $decodedContent[self::INDEX_TAGS])); // Checksum of the _decoded_ data $packageInstance->setContentChecksum($decodedContent[self::INDEX_CHECKSUM]); @@ -1483,11 +1484,11 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei */ public function isNewMessageArrived () { // Determine if the stack is not empty - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: CALLED!'); $hasArrived = (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_NEW_MESSAGE)); // Return it - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: hasArrived=%d - EXIT!', intval($hasArrived))); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: hasArrived=%d - EXIT!', intval($hasArrived))); return $hasArrived; } @@ -1537,11 +1538,11 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei */ public function isProcessedMessagePending () { // Check it - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: CALLED!'); $isPending = (!$this->getStackInstance()->isStackEmpty(self::STACKER_NAME_PROCESSED_MESSAGE)); // Return it - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: isPending=%d - EXIT!', intval($isPending))); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: isPending=%d - EXIT!', intval($isPending))); return $isPending; } diff --git a/application/hub/classes/package/deliverable/class_PackageData.php b/application/hub/classes/package/deliverable/class_PackageData.php index c8c8a14dc..4d0f7c5a1 100644 --- a/application/hub/classes/package/deliverable/class_PackageData.php +++ b/application/hub/classes/package/deliverable/class_PackageData.php @@ -51,6 +51,11 @@ class PackageData extends BaseHubSystem implements DeliverablePackage, Registera */ private $contentChecksum; + /** + * Content tags + */ + private $contentTags; + /** * Package content */ @@ -305,6 +310,25 @@ class PackageData extends BaseHubSystem implements DeliverablePackage, Registera $this->contentHash = $contentHash; } + /** + * Getter for content tags + * + * @return $contentTags Content tags + */ + public function getContentTags () { + return $this->contentTags; + } + + /** + * Setter for content tags + * + * @param $contentTags Content tags + * @return void + */ + public function setContentTags (array $contentTags) { + $this->contentTags = $contentTags; + } + /** * Getter for content message * diff --git a/application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php b/application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php index 4b1455b6e..e9f87725d 100644 --- a/application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php +++ b/application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php @@ -84,20 +84,20 @@ class NetworkPackageReaderTask extends BaseHubTask implements Taskable, Visitabl */ public function executeTask () { // Get package instance - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: CALLED!'); $handlerInstance = NetworkPackageHandlerFactory::createNetworkPackageHandlerInstance(); // Do we have something to handle? - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-READER-TASK: handlerInstance=%s', $handlerInstance->__toString())); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-READER-TASK: handlerInstance=%s', $handlerInstance->__toString())); if ($handlerInstance->isProcessedMessagePending()) { /* * A previously proccessed message is waiting for being * "interpreted". This is done by trying to find a configuration * entry based on 'message_type' element. */ - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleProcessedMessage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleProcessedMessage() ...'); $handlerInstance->handleProcessedMessage(); - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleProcessedMessage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleProcessedMessage() ...'); } elseif ($handlerInstance->isNewMessageArrived()) { /* * A fully "decoded" message has been received and added for being @@ -106,9 +106,9 @@ class NetworkPackageReaderTask extends BaseHubTask implements Taskable, Visitabl * as "XML variables" from the content (which must be a well-formed * XML) and then pushing it on the next stack "processed messages". */ - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleNewlyArrivedMessage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleNewlyArrivedMessage() ...'); $handlerInstance->handleNewlyArrivedMessage(); - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleNewlyArrivedMessage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleNewlyArrivedMessage() ...'); } elseif ($handlerInstance->isIncomingRawDataHandled()) { /* * Incoming decoded data has been handled (see below) so it needs to @@ -116,31 +116,31 @@ class NetworkPackageReaderTask extends BaseHubTask implements Taskable, Visitabl * PackageData for further details (what array elements are * required et cetera). */ - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->assembleDecodedDataToPackage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->assembleDecodedDataToPackage() ...'); $handlerInstance->assembleDecodedDataToPackage(); - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->assembleDecodedDataToPackage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->assembleDecodedDataToPackage() ...'); } elseif ($handlerInstance->ifMultipleMessagesPending()) { /* * Some raw data contained multiple messages which where now * splitted. */ - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleMultipleMessages() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleMultipleMessages() ...'); $handlerInstance->handleMultipleMessages(); - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleMultipleMessages() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleMultipleMessages() ...'); } elseif ($handlerInstance->isNewRawDataPending()) { // Raw, decoded data has been received - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleIncomingDecodedData() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleIncomingDecodedData() ...'); $handlerInstance->handleIncomingDecodedData(); - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleIncomingDecodedData() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleIncomingDecodedData() ...'); } elseif ($handlerInstance->ifAssemblerHasPendingDataLeft()) { // Handle any pending data from the package assembler - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleAssemblerPendingData() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: Calling handlerInstance->handleAssemblerPendingData() ...'); $handlerInstance->handleAssemblerPendingData(); - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleAssemblerPendingData() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: After handlerInstance->handleAssemblerPendingData() ...'); } // Trace message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-READER-TASK: EXIT!'); } /** diff --git a/application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php b/application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php index 0b1c782e2..48631e8a8 100644 --- a/application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php +++ b/application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php @@ -53,11 +53,11 @@ class NetworkPackageWriterTask extends BaseHubTask implements Taskable, Visitabl */ public static final function createNetworkPackageWriterTask () { // Get new instance - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: CALLED!'); $taskInstance = new NetworkPackageWriterTask(); // Return the prepared instance - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-WRITER-TASK: taskInstance=%s - EXIT!', $taskInstance->__toString())); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-WRITER-TASK: taskInstance=%s - EXIT!', $taskInstance->__toString())); return $taskInstance; } @@ -70,11 +70,11 @@ class NetworkPackageWriterTask extends BaseHubTask implements Taskable, Visitabl */ public function accept (Visitor $visitorInstance) { // Visit this task - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-WRITER-TASK: visitorInstance=%s - CALLED!', $visitorInstance->__toString())); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-WRITER-TASK: visitorInstance=%s - CALLED!', $visitorInstance->__toString())); $visitorInstance->visitTask($this); // Trace message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: EXIT!'); } /** @@ -84,31 +84,31 @@ class NetworkPackageWriterTask extends BaseHubTask implements Taskable, Visitabl */ public function executeTask () { // Get package handler instance - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: CALLED!'); $handlerInstance = NetworkPackageHandlerFactory::createNetworkPackageHandlerInstance(); // Do we have something to deliver? - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-WRITER-TASK: handlerInstance=%s', $handlerInstance->__toString())); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-WRITER-TASK: handlerInstance=%s', $handlerInstance->__toString())); if ($handlerInstance->isEncodedDataPending()) { // Sent encoded (raw) data - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->sendEncodedData() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->sendEncodedData() ...'); $handlerInstance->sendEncodedData(); } elseif ($handlerInstance->isPackageWaitingForDelivery()) { // Sent it finally out - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->sendWaitingPackage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->sendWaitingPackage() ...'); $handlerInstance->sendWaitingPackage(); } elseif ($handlerInstance->isPackageDeclared()) { // Prepare package for delivery - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->processDeclaredPackage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->processDeclaredPackage() ...'); $handlerInstance->processDeclaredPackage(); } elseif ($handlerInstance->isPackageEnqueued()) { // Okay, then deliver (better discover its recipients) this package - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->declareEnqueuedPackage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling handlerInstance->declareEnqueuedPackage() ...'); $handlerInstance->declareEnqueuedPackage(); } // Trace message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: EXIT!'); } /** diff --git a/application/hub/classes/tasks/node/decoder/class_NodePackageDecoderTask.php b/application/hub/classes/tasks/node/decoder/class_NodePackageDecoderTask.php index b2c49d8d1..f337f7fed 100644 --- a/application/hub/classes/tasks/node/decoder/class_NodePackageDecoderTask.php +++ b/application/hub/classes/tasks/node/decoder/class_NodePackageDecoderTask.php @@ -76,23 +76,23 @@ class NodePackageDecoderTask extends BaseHubTask implements Taskable, Visitable */ public function executeTask () { // Get a decoder instance - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: CALLED!'); $decoderInstance = DecoderFactory::createPackageDecoderInstance(); // Check if the stacker has some entries left - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-PACKAGE-DECODER-TASK: decoderInstance=%s', $decoderInstance->__toString())); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-PACKAGE-DECODER-TASK: decoderInstance=%s', $decoderInstance->__toString())); if ($decoderInstance->ifDeocedPackagesLeft()) { // Some decoded packages have arrived (for this node) - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Calling decoderInstance->handleDecodedPackage() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Calling decoderInstance->handleDecodedPackage() ...'); $decoderInstance->handleDecodedPackage(); } elseif ($decoderInstance->ifUnhandledRawPackageDataLeft()) { // Handle raw data as last option to prevent that the stack runs full - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Calling decoderInstance->handleRawPackageData() ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: Calling decoderInstance->handleRawPackageData() ...'); $decoderInstance->handleRawPackageData(); } // Trace message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-PACKAGE-DECODER-TASK: CALLED!'); } /** diff --git a/application/hub/exceptions/package/class_UnexpectedPackageStatusException.php b/application/hub/exceptions/package/class_UnexpectedPackageStatusException.php index f6f6b7971..1a9a2674b 100644 --- a/application/hub/exceptions/package/class_UnexpectedPackageStatusException.php +++ b/application/hub/exceptions/package/class_UnexpectedPackageStatusException.php @@ -45,7 +45,7 @@ class UnexpectedPackageStatusException extends FrameworkException { $messageArray[1]->getRecipientUnl(), $messageArray[1]->getSenderAddress(), $messageArray[1]->getSenderPort(), - $messageArray[1]->getHash() + $messageArray[1]->getContentHash() ); // Call parent exception constructor diff --git a/core b/core index 9cd89d14d..cd4ba5256 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 9cd89d14df07b8126300c9535045c779e3fd445c +Subproject commit cd4ba5256a2b12e69dd95d8d4489f70e1ec5343f -- 2.39.5