]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make mod_dialup.c compile when APR has no thread support.
authorStefan Sperling <stsp@apache.org>
Tue, 8 Jan 2019 15:02:15 +0000 (15:02 +0000)
committerStefan Sperling <stsp@apache.org>
Tue, 8 Jan 2019 15:02:15 +0000 (15:02 +0000)
+1 from covener and jim on dev@

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1850757 13f79535-47bb-0310-9956-ffa450edef68

modules/test/mod_dialup.c

index a3abbc35f3e74dc3f1c54b373ddbeb453941d612..cfe778cfeb75f797f7d885d8ce87f0b324d32029 100644 (file)
@@ -107,7 +107,9 @@ dialup_callback(void *baton)
     dialup_baton_t *db = (dialup_baton_t *)baton;
     conn_rec *c = db->r->connection;
 
+#if APR_HAS_THREADS
     apr_thread_mutex_lock(db->r->invoke_mtx);
+#endif
 
     status = dialup_send_pulse(db);
 
@@ -115,7 +117,9 @@ dialup_callback(void *baton)
         ap_mpm_register_timed_callback(apr_time_from_sec(1), dialup_callback, baton);
     }
     else if (status == DONE) {
+#if APR_HAS_THREADS
         apr_thread_mutex_unlock(db->r->invoke_mtx);
+#endif
         ap_finalize_request_protocol(db->r);
         ap_process_request_after_handler(db->r);
         return;
@@ -127,7 +131,9 @@ dialup_callback(void *baton)
         ap_die(status, db->r);
     }
 
+#if APR_HAS_THREADS
     apr_thread_mutex_unlock(db->r->invoke_mtx);
+#endif
 
     ap_mpm_resume_suspended(c);
 }