]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: modify RGWBucketInfo::creation_time encoding / decoding
authorYehuda Sadeh <yehuda@inktank.com>
Mon, 1 Jul 2013 18:01:39 +0000 (11:01 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 1 Jul 2013 18:01:39 +0000 (11:01 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_common.h

index 0fe3af43a26dc40564d6140ff0af430e0899f1fc..84d1075b77767c39bced0bb059cf8ad62612bb14 100644 (file)
@@ -649,7 +649,8 @@ struct RGWBucketInfo
      ::encode(owner, bl);
      ::encode(flags, bl);
      ::encode(region, bl);
-     ::encode((uint64_t)creation_time, bl);
+     uint64_t ct = (uint64_t)creation_time;
+     ::encode(ct, bl);
      ::encode(placement_rule, bl);
      ::encode(has_instance_obj, bl);
      ENCODE_FINISH(bl);
@@ -663,8 +664,11 @@ struct RGWBucketInfo
        ::decode(flags, bl);
      if (struct_v >= 5)
        ::decode(region, bl);
-     if (struct_v >= 6)
-       ::decode((uint64_t&)creation_time, bl);
+     if (struct_v >= 6) {
+       uint64_t ct;
+       ::decode(ct, bl);
+       creation_time = (time_t)ct;
+     }
      if (struct_v >= 7)
        ::decode(placement_rule, bl);
      if (struct_v >= 8)