From 1f33df36dfe5ae4fe57233903288472b467a2fec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 11 Feb 2012 15:56:30 +0000 Subject: [PATCH] Using the separator char in PACKAGE_MASK was duplicate, used assert() in assembleDecodedDataToPackage() to make sure there is at least one pending --- application/hub/main/package/class_NetworkPackage.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index 5161d5db0..499bd7d7a 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -44,7 +44,7 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva * 3: Checksum * 0 1 2 3 */ - const PACKAGE_MASK = '%s^%s^%s^%s'; + const PACKAGE_MASK = '%s%s%s%s%s%s%s'; /** * Seperator for the above mask @@ -413,10 +413,16 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva $content = sprintf(self::PACKAGE_MASK, // 1.) Compressor's extension $this->getCompressorInstance()->getCompressorExtension(), + // - separator + self::PACKAGE_MASK_SEPARATOR, // 2.) Raw package content, encoded with BASE64 base64_encode($content), + // - separator + self::PACKAGE_MASK_SEPARATOR, // 3.) Tags implode(self::PACKAGE_TAGS_SEPERATOR, $helperInstance->getPackageTags()), + // - separator + self::PACKAGE_MASK_SEPARATOR, // 4.) Checksum $this->getHashFromContent($content, $helperInstance, $nodeInstance) ); @@ -682,6 +688,8 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva * @return void */ public function assembleDecodedDataToPackage () { + // Make sure the raw decoded package data is handled + assert($this->isIncomingDecodedDataHandled()); $this->getStackerInstance()->debugInstance(); $this->partialStub('Please implement this method.'); } -- 2.39.5