Fix some style issue to improve readability:
authorChristophe Jaillet <jailletc36@apache.org>
Sat, 23 Jun 2018 20:10:54 +0000 (20:10 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sat, 23 Jun 2018 20:10:54 +0000 (20:10 +0000)
   - break long lines
   - remove un-needed 'return' statement
   - fix the position of the first { in function

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1834224 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_wstunnel.c

index b30de8ce45ff8c753e6c90e6233617bdc8e18b73..dcde71b0d9a9cb6d8cd126f9195dc65093eda450 100644 (file)
@@ -39,7 +39,8 @@ typedef struct ws_baton_t {
 
 static void proxy_wstunnel_callback(void *b);
 
-static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_poll) {
+static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_poll)
+{
     request_rec *r = baton->r;
     conn_rec *c = r->connection;
     proxy_conn_rec *conn = baton->proxy_connrec;
@@ -152,7 +153,8 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_po
     }
 }
 
-static void proxy_wstunnel_finish(ws_baton_t *baton) { 
+static void proxy_wstunnel_finish(ws_baton_t *baton)
+{ 
     ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, baton->r, "proxy_wstunnel_finish");
     baton->proxy_connrec->close = 1; /* new handshake expected on each back-conn */
     baton->r->connection->keepalive = AP_CONN_CLOSE;
@@ -171,9 +173,9 @@ static void proxy_wstunnel_finish(ws_baton_t *baton) {
 static void proxy_wstunnel_cancel_callback(void *b)
 { 
     ws_baton_t *baton = (ws_baton_t*)b;
-    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, baton->r, "proxy_wstunnel_cancel_callback, IO timed out");
+    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, baton->r,
+                  "proxy_wstunnel_cancel_callback, IO timed out");
     proxy_wstunnel_finish(baton);
-    return;
 }
 
 /* Invoked by the event loop when data is ready on either end. 
@@ -181,7 +183,8 @@ static void proxy_wstunnel_cancel_callback(void *b)
  *  We don't need the invoke_mtx, since we never put multiple callback events
  *  in the queue.
  */
-static void proxy_wstunnel_callback(void *b) { 
+static void proxy_wstunnel_callback(void *b)
+{ 
     int status;
     ws_baton_t *baton = (ws_baton_t*)b;
     proxyws_dir_conf *dconf = ap_get_module_config(baton->r->per_dir_config, &proxy_wstunnel_module);
@@ -556,6 +559,7 @@ static const char * proxyws_set_idle(cmd_parms *cmd, void *conf, const char *val
         return "ProxyWebsocketIdleTimeout timeout has wrong format";
     return NULL;
 }
+
 static const char * proxyws_set_aysnch_delay(cmd_parms *cmd, void *conf, const char *val)
 {
     proxyws_dir_conf *dconf = conf;
@@ -566,10 +570,12 @@ static const char * proxyws_set_aysnch_delay(cmd_parms *cmd, void *conf, const c
 
 static const command_rec ws_proxy_cmds[] =
 {
-    AP_INIT_TAKE1("ProxyWebsocketIdleTimeout", proxyws_set_idle, NULL, RSRC_CONF|ACCESS_CONF,
-                 "timeout for activity in either direction, unlimited by default"),
+    AP_INIT_TAKE1("ProxyWebsocketIdleTimeout", proxyws_set_idle, NULL,
+                  RSRC_CONF|ACCESS_CONF,
+                  "timeout for activity in either direction, unlimited by default"),
 
-    AP_INIT_TAKE1("ProxyWebsocketAsyncDelay", proxyws_set_aysnch_delay, NULL, RSRC_CONF|ACCESS_CONF,
+    AP_INIT_TAKE1("ProxyWebsocketAsyncDelay", proxyws_set_aysnch_delay, NULL,
+                 RSRC_CONF|ACCESS_CONF,
                  "amount of time to poll before going asynchronous"),
     {NULL}
 };