]> git.mxchange.org Git - hub.git/commitdiff
Using the separator char in PACKAGE_MASK was duplicate, used assert() in assembleDeco...
authorRoland Häder <roland@mxchange.org>
Sat, 11 Feb 2012 15:56:30 +0000 (15:56 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 11 Feb 2012 15:56:30 +0000 (15:56 +0000)
application/hub/main/package/class_NetworkPackage.php

index 5161d5db0c4d717531cdc74584602eb349c32a84..499bd7d7a672bd6f7bf1c5d42f884ac2c63a1cb4 100644 (file)
@@ -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.');
        }