From 0dabbc9782dfd827ce89db9c048163626c90a515 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 22 Feb 2013 01:18:29 +0000 Subject: [PATCH] Need this back for bug tracking --- .../hub/main/decoder/package/class_PackageDecoder.php | 3 +++ application/hub/main/package/class_NetworkPackage.php | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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; } -- 2.39.2