]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix regionmap json decoding
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 27 Jun 2013 05:39:07 +0000 (22:39 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 27 Jun 2013 05:39:07 +0000 (22:39 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_json_enc.cc

index 78dd6f10c8773c2c3a18221763c1865cb863dc4e..fb077f9aa8c43925e9e12579ce949f536b4ceca6 100644 (file)
@@ -642,16 +642,9 @@ void RGWRegionMap::dump(Formatter *f) const
   encode_json("master_region", master_region, f);
 }
 
-static void decode_regions(map<string, RGWRegion>& regions, JSONObj *o)
-{
-  RGWRegion r;
-  r.decode_json(o);
-  regions[r.name] = r;
-}
-
-
 void RGWRegionMap::decode_json(JSONObj *obj)
 {
-  JSONDecoder::decode_json("regions", regions, decode_regions, obj);
+  JSONDecoder::decode_json("regions", regions, obj);
+  JSONDecoder::decode_json("master_region", master_region, obj);
 }