]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add missing ret code check
authorYehuda Sadeh <yehuda@inktank.com>
Mon, 10 Sep 2012 19:41:33 +0000 (12:41 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 10 Sep 2012 19:41:33 +0000 (12:41 -0700)
Also, for some reason we used cerr instead of dout so fix
that too.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_op.cc

index 2b926865e83881426e549874c267a85ea2a76309..60294652d887e93a9a726224a02365297ad1567f 100644 (file)
@@ -498,13 +498,17 @@ int RGWGetObj::handle_user_manifest(const char *prefix)
     RGWBucketInfo bucket_info;
     int r = rgwstore->get_bucket_info(NULL, bucket_name, bucket_info);
     if (r < 0) {
-      cerr << "could not get bucket info for bucket=" << bucket_name << std::endl;
+      ldout(s->cct, 0) << "could not get bucket info for bucket=" << bucket_name << dendl;
       return r;
     }
     bucket = bucket_info.bucket;
     string no_obj;
     bucket_policy = &_bucket_policy;
     r = read_policy(s, bucket_info, bucket_policy, bucket, no_obj);
+    if (r < 0) {
+      ldout(s->cct, 0) << "failed to read bucket policy" << dendl;
+      return r;
+    }
   } else {
     bucket = s->bucket;
     bucket_policy = s->bucket_acl;