Skip to content

Commit

Permalink
rgw: switch from g_conf to req_state::cct::_conf in RGWListBuckets_Ob…
Browse files Browse the repository at this point in the history
…jStore_SWIFT.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
  • Loading branch information
rzarzynski committed Nov 17, 2016
1 parent 0e0a14a commit 1d7e94b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rgw/rgw_rest_swift.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void RGWListBuckets_ObjStore_SWIFT::send_response_begin(bool has_buckets)
set_req_state_err(s, op_ret);
}

if (!g_conf->rgw_swift_enforce_content_length) {
if (! s->cct->_conf->rgw_swift_enforce_content_length) {
/* Adding account stats in the header to keep align with Swift API */
dump_account_metadata(s,
buckets_count,
Expand Down Expand Up @@ -192,7 +192,7 @@ void RGWListBuckets_ObjStore_SWIFT::send_response_data(RGWUserBuckets& buckets)
s->formatter->dump_int("bytes", obj.size);
}
s->formatter->close_section();
if (! g_conf->rgw_swift_enforce_content_length) {
if (! s->cct->_conf->rgw_swift_enforce_content_length) {
rgw_flush_formatter(s, s->formatter);
}
}
Expand All @@ -204,7 +204,7 @@ void RGWListBuckets_ObjStore_SWIFT::send_response_end()
s->formatter->close_section();
}

if (g_conf->rgw_swift_enforce_content_length) {
if (s->cct->_conf->rgw_swift_enforce_content_length) {
/* Adding account stats in the header to keep align with Swift API */
dump_account_metadata(s,
buckets_count,
Expand All @@ -218,7 +218,7 @@ void RGWListBuckets_ObjStore_SWIFT::send_response_end()
end_header(s, NULL, NULL, s->formatter->get_len(), true);
}

if (sent_data || g_conf->rgw_swift_enforce_content_length) {
if (sent_data || s->cct->_conf->rgw_swift_enforce_content_length) {
rgw_flush_formatter_and_reset(s, s->formatter);
}
}
Expand Down

0 comments on commit 1d7e94b

Please sign in to comment.