httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1744203 - in /httpd/httpd/trunk: CHANGES modules/http2/h2_ngn_shed.c modules/http2/h2_task.c modules/http2/h2_task.h modules/http2/h2_worker.c
Date Tue, 17 May 2016 08:03:32 GMT
Author: icing
Date: Tue May 17 08:03:32 2016
New Revision: 1744203

URL: http://svn.apache.org/viewvc?rev=1744203&view=rev
Log:
mod_http2: fixing c->current_thread on slave connections, addresses PR 59542

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/http2/h2_ngn_shed.c
    httpd/httpd/trunk/modules/http2/h2_task.c
    httpd/httpd/trunk/modules/http2/h2_task.h
    httpd/httpd/trunk/modules/http2/h2_worker.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1744203&r1=1744202&r2=1744203&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue May 17 08:03:32 2016
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_http2: tracking conn_rec->current_thread on slave connections, so
+     that mod_lua finds the correct one. Fixes PR 59542. [Stefan Eissing]
+     
   *) mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,
      allowing per backend TLS configuration.  [Yann Ylavic]
 

Modified: httpd/httpd/trunk/modules/http2/h2_ngn_shed.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_ngn_shed.c?rev=1744203&r1=1744202&r2=1744203&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_ngn_shed.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_ngn_shed.c Tue May 17 08:03:32 2016
@@ -274,6 +274,12 @@ apr_status_t h2_ngn_shed_pull_task(h2_ng
         ngn->no_live++;
         *ptask = entry->task;
         entry->task->assigned = ngn;
+        /* task will now run in ngn's own thread. Modules like lua
+         * seem to require the correct thread set in the conn_rec.
+         * See PR 59542. */
+        if (entry->task->c && ngn->c) {
+            entry->task->c->current_thread = ngn->c->current_thread;
+        }
         return APR_SUCCESS;
     }
     

Modified: httpd/httpd/trunk/modules/http2/h2_task.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_task.c?rev=1744203&r1=1744202&r2=1744203&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_task.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_task.c Tue May 17 08:03:32 2016
@@ -625,7 +625,7 @@ void h2_task_set_io_blocking(h2_task *ta
     task->blocking = blocking;
 }
 
-apr_status_t h2_task_do(h2_task *task)
+apr_status_t h2_task_do(h2_task *task, apr_thread_t *thread)
 {
     AP_DEBUG_ASSERT(task);
     
@@ -659,6 +659,7 @@ apr_status_t h2_task_do(h2_task *task)
     
     ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, task->c,
                   "h2_task(%s): process connection", task->id);
+    task->c->current_thread = thread; 
     ap_run_process_connection(task->c);
     
     if (task->frozen) {

Modified: httpd/httpd/trunk/modules/http2/h2_task.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_task.h?rev=1744203&r1=1744202&r2=1744203&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_task.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_task.h Tue May 17 08:03:32 2016
@@ -101,7 +101,7 @@ h2_task *h2_task_create(conn_rec *c, con
 
 void h2_task_destroy(h2_task *task);
 
-apr_status_t h2_task_do(h2_task *task);
+apr_status_t h2_task_do(h2_task *task, apr_thread_t *thread);
 
 void h2_task_set_response(h2_task *task, struct h2_response *response);
 

Modified: httpd/httpd/trunk/modules/http2/h2_worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_worker.c?rev=1744203&r1=1744202&r2=1744203&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_worker.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_worker.c Tue May 17 08:03:32 2016
@@ -43,7 +43,7 @@ static void* APR_THREAD_FUNC execute(apr
         worker->get_next(worker, worker->ctx, &task, &sticky);
         while (task) {
         
-            h2_task_do(task);
+            h2_task_do(task, thread);
             /* report the task done and maybe get another one from the same
              * mplx (= master connection), if we can be sticky. 
              */



Mime
View raw message