From: Roland Haeder Date: Sun, 16 Mar 2014 20:25:55 +0000 (+0100) Subject: No invert here. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=29237eb4ab2e6a0bddca2e935eb847fa194e9218;p=hub.git No invert here. Signed-off-by: Roland Haeder --- diff --git a/application/hub/main/package/assembler/class_PackageAssembler.php b/application/hub/main/package/assembler/class_PackageAssembler.php index 59100efbf..6939649d2 100644 --- a/application/hub/main/package/assembler/class_PackageAssembler.php +++ b/application/hub/main/package/assembler/class_PackageAssembler.php @@ -96,7 +96,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, $isInputBufferEmpty = $this->getPackageInstance()->getStackerInstance()->isStackEmpty(NetworkPackage::STACKER_NAME_DECODED_HANDLED); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': isInputBufferEmpty=' . intval($isInputBufferEmpty)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ']: isInputBufferEmpty=' . intval($isInputBufferEmpty)); // Return it return $isInputBufferEmpty; @@ -173,7 +173,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, $this->pendingData .= $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]; // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ']: Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)'); } else { // Debug message /* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': packageContent=' . print_r($packageContent, TRUE) . ',chunks='.print_r($chunks, TRUE)); @@ -204,6 +204,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, $isPending = (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_MULTIPLE_MESSAGE)); // Return it + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': isPending=' . intval($isPending)); return $isPending; } @@ -214,7 +215,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, */ public function handlePendingData () { // Debug output - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': Going to decode ' . strlen($this->pendingData) . ' Bytes of pending data. pendingData=' . $this->pendingData); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ']: Going to decode ' . strlen($this->pendingData) . ' Bytes of pending data. pendingData=' . $this->pendingData); // Assert on condition assert(!$this->isPendingDataEmpty()); @@ -222,7 +223,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, // No markers set? if (!$this->ifStartEndMarkersSet($this->pendingData)) { // This will cause an assertition in next call, so simply wait for more data - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': Pending data of ' . strlen($this->pendingData) . ' Bytes are incomplete, waiting for more ...'); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ']: Pending data of ' . strlen($this->pendingData) . ' Bytes are incomplete, waiting for more ...'); return; } elseif (substr_count($this->pendingData, BaseRawDataHandler::STREAM_START_MARKER) > 1) { /* @@ -257,7 +258,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, $this->clearPendingData(); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': Last block of partial data received. A total of ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes has been received.'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ']: Last block of partial data received. A total of ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes has been received.'); // Make sure last CHUNK_SEPARATOR is not there if (substr($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA], -1, 1) == PackageFragmenter::CHUNK_SEPARATOR) { @@ -273,7 +274,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, $chunks = explode(PackageFragmenter::CHUNK_SEPARATOR, $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]); // Add all chunks because the last final chunk is found - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': Going to add ' . count($chunks) . ' to chunk handler ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ']: Going to add ' . count($chunks) . ' to chunk handler ...'); $this->getHandlerInstance()->addAllChunksWithFinal($chunks); } diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index d6ee7e20d..816d034e1 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -1016,7 +1016,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R */ public function ifMultipleMessagesPending () { // Determine if the stack is not empty - $isPending = (!$this->getAssemblerInstance()->ifMultipleMessagesPending()); + $isPending = ($this->getAssemblerInstance()->ifMultipleMessagesPending()); // Return it return $isPending;