]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: ONLY improve formatting in the FCGI frontend.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 4 Aug 2016 14:29:51 +0000 (16:29 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 21 Oct 2016 20:57:19 +0000 (22:57 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_fcgi.cc
src/rgw/rgw_fcgi.h

index 2db97dd739529c998bf3d58c0d41fec7e8953752..95f945d7c496080249872d4a760c279c660be46d 100644 (file)
@@ -5,12 +5,12 @@
 
 #include "acconfig.h"
 
-int RGWFCGX::write_data(const char *buf, int len)
+int RGWFCGX::write_data(const char* const buf, const int len)
 {
   return FCGX_PutStr(buf, len, fcgx->out);
 }
 
-int RGWFCGX::read_data(char *buf, int len)
+int RGWFCGX::read_data(char* const buf, const int len)
 {
   return FCGX_GetStr(buf, len, fcgx->in);
 }
@@ -20,12 +20,12 @@ void RGWFCGX::flush()
   FCGX_FFlush(fcgx->out);
 }
 
-void RGWFCGX::init_env(CephContext *cct)
+void RGWFCGX::init_env(CephContext* const cct)
 {
   env.init(cct, (char **)fcgx->envp);
 }
 
-int RGWFCGX::send_status(int status, const char *status_name)
+int RGWFCGX::send_status(const int status, const char* const status_name)
 {
   static constexpr size_t STATUS_BUF_SIZE = 128;
 
@@ -45,7 +45,7 @@ int RGWFCGX::send_100_continue()
   return r;
 }
 
-int RGWFCGX::send_content_length(uint64_t len)
+int RGWFCGX::send_content_length(const uint64_t len)
 {
   static constexpr size_t CONLEN_BUF_SIZE = 128;
 
index f49c3586125a043103a42261a84fc9d0c0af21c0..046dbb53e1f5cf708d9ff897f0906c116fc0be09 100644 (file)
@@ -17,21 +17,28 @@ class RGWFCGX : public RGWStreamIOEngine
   RGWEnv env;
 
 public:
-  void init_env(CephContext *cct);
-  int write_data(const char *buf, int len);
-  int read_data(char *buf, int len);
-
-  int send_status(int status, const char *status_name);
-  int send_100_continue();
-  int complete_header();
-  int complete_request() { return 0; }
-  int send_content_length(uint64_t len);
-  explicit RGWFCGX(FCGX_Request *_fcgx) : fcgx(_fcgx) {}
+  explicit RGWFCGX(FCGX_Request* const fcgx)
+    : fcgx(fcgx) {
+  }
+
+  void init_env(CephContext* cct) override;
+  int read_data(char* buf, int len) override;
+  int write_data(const char* buf, int len) override;
+
+  int send_status(int status, const char* status_name) override;
+  int send_100_continue() override;
+  int send_content_length(uint64_t len) override;
+  int complete_header() override;
+
   void flush();
 
   RGWEnv& get_env() override {
     return env;
   }
+
+  int complete_request() override {
+    return 0;
+  }
 };
 
 #endif