mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
only call mutex functions if APR_HAS_THREADS
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@745338 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -290,8 +290,10 @@ void ap_process_async_request(request_rec *r)
|
||||
ap_time_process_request(r->connection->sbh, START_PREQUEST);
|
||||
}
|
||||
|
||||
#if APR_HAS_THREADS
|
||||
apr_thread_mutex_create(&r->invoke_mtx, APR_THREAD_MUTEX_DEFAULT, r->pool);
|
||||
apr_thread_mutex_lock(r->invoke_mtx);
|
||||
#endif
|
||||
access_status = ap_run_quick_handler(r, 0); /* Not a look-up request */
|
||||
if (access_status == DECLINED) {
|
||||
access_status = ap_process_request_internal(r);
|
||||
@@ -309,10 +311,14 @@ void ap_process_async_request(request_rec *r)
|
||||
ap_time_process_request(c->sbh, STOP_PREQUEST);
|
||||
}
|
||||
c->cs->state = CONN_STATE_SUSPENDED;
|
||||
#if APR_HAS_THREADS
|
||||
apr_thread_mutex_unlock(r->invoke_mtx);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#if APR_HAS_THREADS
|
||||
apr_thread_mutex_unlock(r->invoke_mtx);
|
||||
#endif
|
||||
|
||||
if (access_status == DONE) {
|
||||
/* e.g., something not in storage like TRACE */
|
||||
|
Reference in New Issue
Block a user