do {
RGWUserBuckets buckets;
uint64_t read_count;
- read_count = min(limit - total_count, (uint64_t)max_buckets);
+ if (limit >= 0) {
+ read_count = min(limit - total_count, (uint64_t)max_buckets);
+ } else {
+ read_count = max_buckets;
+ }
ret = rgw_read_user_buckets(store, s->user.user_id, buckets,
marker, read_count, should_get_stats(), 0);
total_count += m.size();
- done = (m.size() < read_count || total_count >= limit);
+ done = (m.size() < read_count || (limit >= 0 && total_count >= (uint64_t)limit));
if (!m.empty()) {
send_response_data(buckets);
~RGWListBuckets_ObjStore_S3() {}
int get_params() {
- limit = 0; /* no limit */
+ limit = -1; /* no limit */
return 0;
}
virtual void send_response_begin(bool has_buckets);