Commit c10670fc authored by Jeff Trawick's avatar Jeff Trawick
Browse files

fill in conn_rec::current_thread for WinNT, NetWare, and OS/2 MPMs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103595 13f79535-47bb-0310-9956-ffa450edef68
parent 02bf2d0c
Loading
Loading
Loading
Loading
+0 −7
Changes for STATUS: 0 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -81,13 +81,6 @@ RELEASE SHOWSTOPPERS:
    practices and not use deprecated features.
      wrowe sez: be specific or this isn't a SHOWSTOPPER

  * Not all MPMs are updated to set conn_rec::current_thread correctly.
      (Prefork, Worker, Event, Simple are updated).
      jim sez: Then we just ship with those... mark any others as
                experimental, pgollucci +1 jim
      wrowe sez: no... Then we just don't ship those (see #1 above)
                 Is this still an issue, didn't jtrawick fix this?

  * The mod_session* modules need to be checked that their hooks respect
    the returning of int (HTTP status codes) and apr_status_t as appropriate,
    and any anomolies fixed.
+6 −0
Changes for server/mpm/mpmt_os2/mpmt_os2_child.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -342,6 +342,8 @@ ULONG APIENTRY thread_exception_handler(EXCEPTIONREPORTRECORD *pReportRec,

static void worker_main(void *vpArg)
{
    apr_thread_t *thd = NULL;
    apr_os_thread_t osthd;
    long conn_id;
    conn_rec *current_conn;
    apr_pool_t *pconn;
@@ -361,6 +363,9 @@ static void worker_main(void *vpArg)
    /* Trap exceptions in this thread so we don't take down the whole process */
    DosSetExceptionHandler( &reg_rec );

    osthd = apr_os_thread_current();
    apr_os_thread_put(&thd, &osthd, pchild);

    rc = DosOpenQueue(&owner, &workq,
                      apr_psprintf(pchild, "/queues/httpd/work.%d", getpid()));

@@ -387,6 +392,7 @@ static void worker_main(void *vpArg)
                                                sbh, bucket_alloc);

        if (current_conn) {
            current_conn->current_thread = thd;
            ap_process_connection(current_conn, worker_args->conn_sd);
            ap_lingering_close(current_conn);
        }
+6 −0
Changes for server/mpm/netware/mpm_netware.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -342,6 +342,8 @@ void worker_main(void *arg)
    conn_rec *current_conn;
    apr_status_t stat = APR_EINIT;
    ap_sb_handle_t *sbh;
    apr_thread_t *thd = NULL;
    apr_os_thread_t osthd;

    int my_worker_num = (int)arg;
    apr_socket_t *csd = NULL;
@@ -354,6 +356,9 @@ void worker_main(void *arg)
    struct timeval tv;
    int wouldblock_retry;

    osthd = apr_os_thread_current();
    apr_os_thread_put(&thd, &osthd, pmain);

    tv.tv_sec = 1;
    tv.tv_usec = 0;

@@ -522,6 +527,7 @@ void worker_main(void *arg)
                                                my_worker_num, sbh,
                                                bucket_alloc);
        if (current_conn) {
            current_conn->current_thread = thd;
            ap_process_connection(current_conn, csd);
            ap_lingering_close(current_conn);
        }
+7 −0
Changes for server/mpm/winnt/child.c: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -729,6 +729,8 @@ static winnt_conn_ctx_t *winnt_get_connection(winnt_conn_ctx_t *context)
 */
static DWORD __stdcall worker_main(void *thread_num_val)
{
    apr_thread_t *thd;
    apr_os_thread_t osthd;
    static int requests_this_child = 0;
    winnt_conn_ctx_t *context = NULL;
    int thread_num = (int)thread_num_val;
@@ -738,6 +740,9 @@ static DWORD __stdcall worker_main(void *thread_num_val)
    conn_rec *c;
    apr_int32_t disconnected;

    osthd = apr_os_thread_current();
    apr_os_thread_put(&thd, &osthd, pchild);

    while (1) {

        ap_update_child_status_from_indexes(0, thread_num, SERVER_READY, NULL);
@@ -774,6 +779,8 @@ static DWORD __stdcall worker_main(void *thread_num_val)
            continue;
        }

        c->current_thread = thd;

        /* follow ap_process_connection(c, context->sock) logic
         * as it left us no chance to reinject our first data bucket.
         */