From dd2893ba05c1095405b3a5edc16b3b1c7916cd7d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 28 Jun 2017 12:19:52 -0400 Subject: [PATCH] rgw: fix RGWMetadataLog::list_entries() for null last_marker Signed-off-by: Casey Bodley --- src/rgw/rgw_metadata.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_metadata.cc b/src/rgw/rgw_metadata.cc index a4103175cc029..f81c4490ae821 100644 --- a/src/rgw/rgw_metadata.cc +++ b/src/rgw/rgw_metadata.cc @@ -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; -- 2.39.5