From: Roland Häder Date: Fri, 22 Feb 2013 01:18:29 +0000 (+0000) Subject: Need this back for bug tracking X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0dabbc9782dfd827ce89db9c048163626c90a515;p=hub.git Need this back for bug tracking --- diff --git a/application/hub/main/decoder/package/class_PackageDecoder.php b/application/hub/main/decoder/package/class_PackageDecoder.php index f3f9257e1..2db2c2a1b 100644 --- a/application/hub/main/decoder/package/class_PackageDecoder.php +++ b/application/hub/main/decoder/package/class_PackageDecoder.php @@ -126,6 +126,9 @@ class PackageDecoder extends BaseDecoder implements Decodeable { * @return void */ public function handleDecodedPackage () { + // Assert on amount + assert($this->ifDeocedPackagesLeft()); + // Get the next entry (assoziative array) $decodedData = $this->getStackerInstance()->popNamed(self::STACKER_NAME_DECODED_PACKAGE); diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index 445906d03..a56ccb73c 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -307,7 +307,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R */ private function getHashFromContent ($content) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($content) . ',sender=' . $this->getSessionId() . ',compressor=' . $this->getCompressorInstance()->getCompressorExtension()); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($content) . ',sender=' . $this->getSessionId() . ',compressor=' . $this->getCompressorInstance()->getCompressorExtension()); // Create the hash // @TODO crc32() is very weak, but it needs to be fast @@ -319,6 +319,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R $this->getCompressorInstance()->getCompressorExtension() ); + // Debug message + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE: content[md5]=' . md5($content) . ',sender=' . $this->getSessionId() . ',hash=' . $hash . ',compressor=' . $this->getCompressorInstance()->getCompressorExtension()); + // And return it return $hash; }