From 5d7a12cf83f5dcb70b5aa4aeb7a26c6a24276101 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 15 Mar 2011 17:17:22 -0700 Subject: [PATCH] rgw: explicit case mtime to uint64 before encoding/decoding --- src/rgw/rgw_cache.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_cache.h b/src/rgw/rgw_cache.h index d0de5c5845904..5240d2efce47e 100644 --- a/src/rgw/rgw_cache.h +++ b/src/rgw/rgw_cache.h @@ -103,7 +103,9 @@ int RGWCache::obj_stat(std::string& bucket, std::string& obj, size_t *psize, if (r == 0) { bufferlist::iterator iter = bl.begin(); ::decode(size, iter); - ::decode(mtime, iter); + int64_t t; + ::decode(t, iter); + mtime = (time_t)t; goto done; } r = T::obj_stat(bucket, obj, &size, &mtime); @@ -111,7 +113,8 @@ int RGWCache::obj_stat(std::string& bucket, std::string& obj, size_t *psize, return r; bl.clear(); ::encode(size, bl); - ::encode(mtime, bl); + int64_t t = (int64_t)mtime; + ::encode(t, bl); cache.put(name, bl); done: if (psize) -- 2.39.5