From: Roland Häder Date: Sat, 11 Feb 2012 15:56:30 +0000 (+0000) Subject: Using the separator char in PACKAGE_MASK was duplicate, used assert() in assembleDeco... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1f33df36dfe5ae4fe57233903288472b467a2fec;p=hub.git Using the separator char in PACKAGE_MASK was duplicate, used assert() in assembleDecodedDataToPackage() to make sure there is at least one pending --- 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.'); }