You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pq...@apache.org on 2008/09/21 00:04:03 UTC

svn commit: r697425 - in /httpd/httpd/trunk/server: mpm/experimental/event/mpm.h mpm_common.c

Author: pquerna
Date: Sat Sep 20 15:04:03 2008
New Revision: 697425

URL: http://svn.apache.org/viewvc?rev=697425&view=rev
Log:
Add dummy ap_mpm_register_timed_callback for other MPMs besides Event.

Modified:
    httpd/httpd/trunk/server/mpm/experimental/event/mpm.h
    httpd/httpd/trunk/server/mpm_common.c

Modified: httpd/httpd/trunk/server/mpm/experimental/event/mpm.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/experimental/event/mpm.h?rev=697425&r1=697424&r2=697425&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/experimental/event/mpm.h (original)
+++ httpd/httpd/trunk/server/mpm/experimental/event/mpm.h Sat Sep 20 15:04:03 2008
@@ -49,6 +49,8 @@
 #define AP_MPM_WANT_FATAL_SIGNAL_HANDLER
 #define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
 
+#define AP_MPM_HAS_USER_CALLBACKS
+
 #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
 #define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
 #define MPM_ACCEPT_FUNC unixd_accept

Modified: httpd/httpd/trunk/server/mpm_common.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_common.c?rev=697425&r1=697424&r2=697425&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm_common.c (original)
+++ httpd/httpd/trunk/server/mpm_common.c Sat Sep 20 15:04:03 2008
@@ -1288,3 +1288,15 @@
 }
 
 #endif /* AP_MPM_WANT_FATAL_SIGNAL_HANDLER */
+
+#ifndef AP_MPM_HAS_USER_CALLBACKS
+
+AP_DECLARE(void) ap_mpm_register_timed_callback(apr_time_t t,
+                                                ap_mpm_callback_fn_t *cbfn,
+                                                void *baton)
+{
+    abort();
+}
+
+#endif /* AP_MPM_HAS_USER_CALLBACKS */
+



Re: svn commit: r697425 - in /httpd/httpd/trunk/server: mpm/experimental/event/mpm.h mpm_common.c

Posted by Ruediger Pluem <rp...@apache.org>.

On 09/21/2008 12:04 AM, pquerna@apache.org wrote:
> Author: pquerna
> Date: Sat Sep 20 15:04:03 2008
> New Revision: 697425
> 
> URL: http://svn.apache.org/viewvc?rev=697425&view=rev
> Log:
> Add dummy ap_mpm_register_timed_callback for other MPMs besides Event.
> 
> Modified:
>     httpd/httpd/trunk/server/mpm/experimental/event/mpm.h
>     httpd/httpd/trunk/server/mpm_common.c

Thanks for doing. Thinking about it more closer I guess the best way would be to
move

typedef void (ap_mpm_callback_fn_t)(void *baton);

/* XXXXXXX: only added support in the Event MPM.... */
AP_DECLARE(void) ap_mpm_register_timed_callback(apr_time_t t,
                                                 ap_mpm_callback_fn_t *cbfn,
                                                 void *baton);


to mpm_common.h and put it into a

#ifdef AP_MPM_HAS_USER_CALLBACKS

#endif

block. Of course this requires mod_dialup to include mpm_common.h.
But as far as I can see all specific MPM functions are done this way.

Regards

RĂ¼diger