summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_rest_metadata.cc
diff options
context:
space:
mode:
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>2016-08-12 15:46:55 +0200
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>2016-10-21 22:57:20 +0200
commited2bf828cf10e1c5c0e7296454c288a9517ed26f (patch)
treed3917e650ae436feac9fde10ab2c9178db657800 /src/rgw/rgw_rest_metadata.cc
parentrgw: implement RGWStreamIOEngine::{send,recv}_body(). (diff)
downloadceph-ed2bf828cf10e1c5c0e7296454c288a9517ed26f.tar.xz
ceph-ed2bf828cf10e1c5c0e7296454c288a9517ed26f.zip
rgw: switch to RGWStreamIOEngine::{send,recv}_body().
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Diffstat (limited to 'src/rgw/rgw_rest_metadata.cc')
-rw-r--r--src/rgw/rgw_rest_metadata.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rgw/rgw_rest_metadata.cc b/src/rgw/rgw_rest_metadata.cc
index 8f02b0fbaa1..396f72b3bc2 100644
--- a/src/rgw/rgw_rest_metadata.cc
+++ b/src/rgw/rgw_rest_metadata.cc
@@ -119,13 +119,13 @@ int RGWOp_Metadata_Put::get_data(bufferlist& bl) {
if (!data) {
return -ENOMEM;
}
- int r = STREAM_IO(s)->read(data, cl, &read_len);
+ read_len = recv_body(s, data, cl);
if (cl != (size_t)read_len) {
- dout(10) << "cio->read incomplete" << dendl;
+ dout(10) << "recv_body incomplete" << dendl;
}
- if (r < 0) {
+ if (read_len < 0) {
free(data);
- return r;
+ return read_len;
}
bl.append(data, read_len);
} else {
@@ -139,10 +139,10 @@ int RGWOp_Metadata_Put::get_data(bufferlist& bl) {
return -ENOMEM;
}
do {
- int r = STREAM_IO(s)->read(data, chunk_size, &read_len);
- if (r < 0) {
+ read_len = recv_body(s, data, chunk_size);
+ if (read_len < 0) {
free(data);
- return r;
+ return read_len;
}
bl.append(data, read_len);
} while (read_len == chunk_size);