]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix for stupid CodeWarrior compiler.
authorGuenter Knauf <fuankg@apache.org>
Tue, 18 Jun 2013 16:51:17 +0000 (16:51 +0000)
committerGuenter Knauf <fuankg@apache.org>
Tue, 18 Jun 2013 16:51:17 +0000 (16:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494196 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_wstunnel.c

index e0fbc142a8fa4c5c3968b5cce08e08f0981e9210..5b1ac5517f013f03c2e8dca24b5653775ea424e8 100644 (file)
@@ -118,15 +118,16 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout) {
 static void proxy_wstunnel_callback(void *b) { 
     int status;
     ws_baton_t *baton = (ws_baton_t*)b;
+    apr_socket_t *sockets[3] = {NULL, NULL, NULL};
     apr_thread_mutex_lock(baton->r->invoke_mtx);
     apr_pool_clear(baton->subpool);
     status = proxy_wstunnel_pump(baton, apr_time_from_sec(5));
+    sockets[0] = baton->client_soc;
+    sockets[1] = baton->server_soc;
     if (status == SUSPENDED) {
-        apr_socket_t *sockets[3] = {baton->client_soc,  baton->server_soc, NULL};
         ap_mpm_register_socket_callback(sockets, baton->subpool, 1, proxy_wstunnel_callback, baton);
     }
     else {
-        apr_socket_t *sockets[3] = {baton->client_soc,  baton->server_soc, NULL};
         ap_mpm_unregister_socket_callback(sockets, baton->subpool);
         apr_thread_mutex_unlock(baton->r->invoke_mtx);
         ap_finalize_request_protocol(baton->r);
@@ -301,6 +302,7 @@ static int ap_proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
     apr_bucket_brigade *bb = apr_brigade_create(p, c->bucket_alloc);
     apr_socket_t *client_socket = ap_get_conn_socket(c);
     ws_baton_t *baton = apr_pcalloc(r->pool, sizeof(ws_baton_t));
+    apr_socket_t *sockets[3] = {NULL, NULL, NULL};
     int status;
 
     header_brigade = apr_brigade_create(p, backconn->bucket_alloc);
@@ -366,7 +368,8 @@ static int ap_proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
 
     status = proxy_wstunnel_pump(baton, apr_time_from_sec(5)); 
     if (status == SUSPENDED) {
-        apr_socket_t *sockets[3] = {baton->client_soc,  baton->server_soc, NULL};
+        sockets[0] = baton->client_soc;
+        sockets[1] = baton->server_soc;
         status = ap_mpm_register_socket_callback(sockets, baton->subpool, 1, proxy_wstunnel_callback, baton);
         if (status == APR_SUCCESS) { 
             return SUSPENDED;