httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r759860 - /httpd/httpd/trunk/modules/mappers/mod_watchdog.c
Date Mon, 30 Mar 2009 07:54:06 GMT
Author: mturk
Date: Mon Mar 30 07:54:05 2009
New Revision: 759860

URL: http://svn.apache.org/viewvc?rev=759860&view=rev
Log:
Run the callback from pool cleanup.
This allows to break the blocked callbacks

Modified:
    httpd/httpd/trunk/modules/mappers/mod_watchdog.c

Modified: httpd/httpd/trunk/modules/mappers/mod_watchdog.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_watchdog.c?rev=759860&r1=759859&r2=759860&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_watchdog.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_watchdog.c Mon Mar 30 07:54:05 2009
@@ -76,6 +76,19 @@
 {
     apr_status_t rv;
     ap_watchdog_t *w = (ap_watchdog_t *)data;
+
+    if (w->is_running) {
+        watchdog_list_t *wl = w->callbacks;
+        while (wl) {
+            if (wl->status == APR_SUCCESS) {
+                /* Execute watchdog callback with STOPPING state */
+                (*wl->callback_fn)(AP_WATCHDOG_STATE_STOPPING,
+                                    (void *)wl->data, w->pool);
+                wl->status = APR_EOF;
+            }
+            wl = wl->next;
+        }
+    }
     w->is_running = 0;
     apr_thread_join(&rv, w->thread);
     return rv;



Mime
View raw message