Переглянути джерело

Merge remote-tracking branch 'origin/candidate-3.10.8' into candidate-3.10.x

Conflicts:
	version.cmake

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 роки тому
батько
коміт
f4ea91d019
2 змінених файлів з 18 додано та 7 видалено
  1. 16 5
      common/remote/sockfile.cpp
  2. 2 2
      dali/dfuplus/dfuplus.cpp

+ 16 - 5
common/remote/sockfile.cpp

@@ -1347,8 +1347,19 @@ public:
         size32_t rest = _buf.length()-_buf.getPos();
         const byte *rb = (const byte *)_buf.readDirect(rest);
         bool ret = true;
-        if (rest&&(rb[rest-1]!=0)) {
-            rest--;
+        // At the last byte of the rb (rb[rest-1]) is the stream live flag
+        //  True if the stream has more data
+        //  False at the end of stream
+        // The previous byte (rb[rest-2]) is the flag to signal there are more
+        // valid entries in this block
+        //  True if there are valid directory entry follows this flag
+        //  False if there are no more valid entry in this block aka end of block
+        // If there is more data in the stream, the end of block flag should be removed
+        if (rest&&(rb[rest-1]!=0)) 
+        {
+            rest--; // remove stream live flag
+            if(rest && (0 == rb[rest-1]))
+            	rest--; //Remove end of block flag
             ret = false;  // continuation
         }
         buf.append(rest,rb);
@@ -1379,9 +1390,9 @@ public:
             curisdir = false;
             if (buf.getPos()>=buf.length())
                 return false;
-            byte b;
-            buf.read(b);
-            curvalid = b!=0;
+            byte isValidEntry;
+            buf.read(isValidEntry);
+            curvalid = isValidEntry!=0;
             if (!curvalid) 
                 return false;
             buf.read(curisdir);

+ 2 - 2
dali/dfuplus/dfuplus.cpp

@@ -318,7 +318,7 @@ bool CDfuPlusHelper::fixedSpray(const char* srcxml,const char* srcip,const char*
         req->setTransferBufferSize(globals->getPropInt("transferbuffersize"));
 
     if(srcxml == NULL)
-        info("\nSpraying from %s on %s to %s\n", srcfile, srcip, dstname);
+        info("\nFixed spraying from %s on %s to %s\n", srcfile, srcip, dstname);
     else
         info("\nSpraying to %s\n", dstname);
 
@@ -424,7 +424,7 @@ bool CDfuPlusHelper::variableSpray(const char* srcxml,const char* srcip,const ch
         req->setTransferBufferSize(globals->getPropInt("transferbuffersize"));
 
     if(srcxml == NULL)
-        info("\nSpraying from %s on %s to %s\n", srcfile, srcip, dstname);
+        info("\nVariable spraying from %s on %s to %s\n", srcfile, srcip, dstname);
     else
         info("\nSpraying to %s\n", dstname);
     Owned<IClientSprayResponse> result = sprayclient->SprayVariable(req);