]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix RGWMetadataLog::list_entries() for null last_marker
authorCasey Bodley <cbodley@redhat.com>
Wed, 28 Jun 2017 16:19:52 +0000 (12:19 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 28 Jun 2017 18:36:12 +0000 (14:36 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_metadata.cc

index a4103175cc029990fb9314827681c8b660d0edd6..f81c4490ae82160d605346f72706b1e05145a824 100644 (file)
@@ -150,14 +150,17 @@ int RGWMetadataLog::list_entries(void *handle,
     return 0;
   }
 
+  std::string next_marker;
   int ret = store->time_log_list(ctx->cur_oid, ctx->from_time, ctx->end_time,
                                 max_entries, entries, ctx->marker,
-                                last_marker, truncated);
+                                &next_marker, truncated);
   if ((ret < 0) && (ret != -ENOENT))
     return ret;
 
-  ctx->marker = *last_marker;
-  
+  ctx->marker = std::move(next_marker);
+  if (last_marker) {
+    *last_marker = ctx->marker;
+  }
 
   if (ret == -ENOENT)
     *truncated = false;