]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: RGWClientIO::get_env() is pure virtual now.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 29 Jul 2016 10:31:45 +0000 (12:31 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 21 Oct 2016 20:57:18 +0000 (22:57 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_client_io.cc
src/rgw/rgw_client_io.h
src/rgw/rgw_lib.h

index 41afe9aafcb595c9ca70c397e13f1a4abb32075c..c152ffa5281b79b3b94e859229fa7a87d99c3613 100644 (file)
@@ -13,7 +13,7 @@ void RGWClientIO::init(CephContext *cct) {
   init_env(cct);
 
   if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
-    std::map<string, string, ltstr_nocase>& env_map = env.get_map();
+    std::map<string, string, ltstr_nocase>& env_map = get_env().get_map();
     std::map<string, string, ltstr_nocase>::iterator iter = env_map.begin();
 
     for (iter = env_map.begin(); iter != env_map.end(); ++iter) {
index e9456878ee96ad5d58ba0e01e6da43c6c6cf956b..89c3123cb4d60201ec9862a7a6b35f46e1593bdd 100644 (file)
 
 class RGWClientIO {
 protected:
-  RGWEnv env;
-
   virtual void init_env(CephContext *cct) = 0;
 
 public:
   virtual ~RGWClientIO() {}
 
   void init(CephContext *cct);
-  RGWEnv& get_env() {
-    return env;
-  }
-
-  virtual int complete_request() = 0; /* XXX signature likely changing */
+  virtual RGWEnv& get_env() = 0;
+  virtual int complete_request() = 0;
 }; /* RGWClient IO */
 
 
@@ -91,6 +86,9 @@ class RGWStreamIO : public RGWStreamIOEngine,
     return _account;
   }
 
+protected:
+  RGWEnv env;
+
 public:
   virtual ~RGWStreamIO() {}
   RGWStreamIO()
@@ -108,6 +106,10 @@ public:
 
   std::string grab_aws4_sha256_hash();
 
+  RGWEnv& get_env() override {
+    return env;
+  }
+
   void set_account(bool _accnt) override {
     _account = _accnt;
   }
index 96b52cebc66f541ddd78e4fbfcd75193b3ff125f..c937d475120e10d3047f1179bc5d9477ce559226 100644 (file)
@@ -54,6 +54,7 @@ namespace rgw {
                    public RGWClientIOAccounter
   {
     RGWUserInfo user_info;
+    RGWEnv env;
   public:
     RGWLibIO() {
       get_env().set("HTTP_HOST", "");
@@ -76,6 +77,10 @@ namespace rgw {
     int complete_header();
     int send_content_length(uint64_t len);
 
+    RGWEnv& get_env() override {
+      return env;
+    }
+
     int complete_request() override { /* XXX */
       return 0;
     };