You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/12/25 10:01:37 UTC

[GitHub] ShannonDing closed pull request #34: [ISSUE #33] CPullConsumer cannot pull message because of pullResult without nextBeginOffset

ShannonDing closed pull request #34: [ISSUE #33] CPullConsumer cannot pull message because of pullResult without nextBeginOffset
URL: https://github.com/apache/rocketmq-client-cpp/pull/34
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/extern/CPullConsumer.cpp b/src/extern/CPullConsumer.cpp
index 415bb5b4..cf7c01f5 100644
--- a/src/extern/CPullConsumer.cpp
+++ b/src/extern/CPullConsumer.cpp
@@ -173,12 +173,15 @@ Pull(CPullConsumer *consumer, const CMessageQueue *mq, const char *subExpression
         cppPullResult.pullStatus = BROKER_TIMEOUT;
     }
 
+    if(cppPullResult.pullStatus != BROKER_TIMEOUT){
+        pullResult.maxOffset = cppPullResult.maxOffset;
+        pullResult.minOffset = cppPullResult.minOffset;
+        pullResult.nextBeginOffset = cppPullResult.nextBeginOffset;
+    }
+
     switch (cppPullResult.pullStatus) {
         case FOUND: {
             pullResult.pullStatus = E_FOUND;
-            pullResult.maxOffset = cppPullResult.maxOffset;
-            pullResult.minOffset = cppPullResult.minOffset;
-            pullResult.nextBeginOffset = cppPullResult.nextBeginOffset;
             pullResult.size = cppPullResult.msgFoundList.size();
             PullResult *tmpPullResult = new PullResult(cppPullResult);
             pullResult.pData = tmpPullResult;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services