]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: encode time_t, size_t using fixed-size types
authorSage Weil <sage@newdream.net>
Tue, 6 Oct 2009 17:05:57 +0000 (10:05 -0700)
committerSage Weil <sage@newdream.net>
Tue, 6 Oct 2009 17:07:37 +0000 (10:07 -0700)
src/radosgw/rgw_common.h

index 8a27fe2ebfe16c6435101e4fe3184f5932079bcb..deca3606b699995b419b5ce60bd4246c01f0e080 100644 (file)
@@ -163,14 +163,20 @@ struct RGWObjEnt {
   char etag[MD5_DIGEST_LENGTH * 2 + 1];
 
   void encode(bufferlist& bl) const {
-     ::encode(name, bl);
-     ::encode(size, bl);
-     ::encode(mtime, bl);
+    __u64 s = size;
+    __u32 mt = mtime;
+    ::encode(name, bl);
+    ::encode(s, bl);
+    ::encode(mt, bl);
   }
   void decode(bufferlist::iterator& bl) {
+    __u32 mt;
+    __u64 s;
     ::decode(name, bl);
-    ::decode(size, bl);
-    ::decode(mtime, bl);
+    ::decode(s, bl);
+    ::decode(mt, bl);
+    size = s;
+    mtime = mt;
   }
 };
 WRITE_CLASS_ENCODER(RGWObjEnt)