]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix multi delete
authorYehuda Sadeh <yehuda@inktank.com>
Mon, 12 Aug 2013 17:05:44 +0000 (10:05 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 12 Aug 2013 21:29:19 +0000 (14:29 -0700)
Fixes: #5931
Backport: bobtail, cuttlefish

Fix a bad check, where we compare the wrong field. Instead of
comparing the ret code to 0, we compare the string value to 0
which generates implicit casting, hence the crash.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
src/rgw/rgw_rest_s3.cc

index bbf363804bde8c4bbe28a5e29b31dca6dc0dbc57..8690dd8fdbebdf179c5765f537c56d1d1ce29b15 100644 (file)
@@ -1709,7 +1709,7 @@ void RGWDeleteMultiObj_ObjStore_S3::send_partial_response(pair<string,int>& resu
       s->formatter->open_object_section("Deleted");
       s->formatter->dump_string("Key", result.first);
       s->formatter->close_section();
-    } else if (result.first < 0) {
+    } else if (result.second < 0) {
       struct rgw_http_errors r;
       int err_no;