diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2018-06-23 22:10:54 +0200 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2018-06-23 22:10:54 +0200 |
commit | c9ed35a57ae8bde6729d61040894ce976ff52d93 (patch) | |
tree | e6ce4878453c35becb0de29881d52567d9481f0a /modules | |
parent | Follow-up to r1754161 (diff) | |
download | apache2-c9ed35a57ae8bde6729d61040894ce976ff52d93.tar.xz apache2-c9ed35a57ae8bde6729d61040894ce976ff52d93.zip |
Fix some style issue to improve readability:
- 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
Diffstat (limited to 'modules')
-rw-r--r-- | modules/proxy/mod_proxy_wstunnel.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/modules/proxy/mod_proxy_wstunnel.c b/modules/proxy/mod_proxy_wstunnel.c index b30de8ce45..dcde71b0d9 100644 --- a/modules/proxy/mod_proxy_wstunnel.c +++ b/modules/proxy/mod_proxy_wstunnel.c @@ -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} }; |