]> git.mxchange.org Git - hub.git/commitdiff
Noisy debug line added + check if start and end markers are set.
authorRoland Haeder <roland@mxchange.org>
Fri, 14 Mar 2014 20:51:39 +0000 (21:51 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 14 Mar 2014 20:51:39 +0000 (21:51 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/main/package/assembler/class_PackageAssembler.php
application/hub/main/streams/raw_data/input/class_RawDataInputStream.php

index c39df78649b45fe7224dd5d5797b9893a2aaf947..0eec7aff05545a31b66cf614aed90c188b0d73c1 100644 (file)
@@ -192,6 +192,13 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable
                // Assert on condition
                assert(!$this->isPendingDataEmpty());
 
+               // No markers set?
+               if (!$this->ifStartEndMarkersSet($this->pendingData)) {
+                       // This will cause an assertition in next call, so simply wait for more data
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ': Pending data of ' . strlen($this->pendingData) . ' Bytes are incomplete, waiting for more ...');
+                       return;
+               } // END - if
+
                // Init fake array
                $packageContent = array(
                        BaseRawDataHandler::PACKAGE_RAW_DATA   => $this->getInputStreamInstance()->streamData($this->pendingData),
index 37a87b2c2665c5dad25a6828402a3f5e090bc197..dfce170c4ab1504abe35b0d7fa7ba5ce42661635 100644 (file)
@@ -60,6 +60,9 @@ class RawDataInputStream extends BaseStream implements InputStreamable {
         * @throws      Base64EncodingBadException              If the data contains characters which are not in the "alphabet" of BASE64 messages.
         */
        public function streamData ($data) {
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RAW-INPUT-STREAM[' . __METHOD__ . ':' . __LINE__ . ': data(' . strlen($data) . ')=' . $data);
+
                // Do we have start and end marker again?
                assert($this->ifStartEndMarkersSet($data));