Giving mod_logrotate a signature

This is my first trial giving a third party module a signature.

--- mod_log_rotate.c.orig    2008-07-24 13:17:45.000000000 +0200
+++ mod_log_rotate.c    2010-11-21 02:31:43.123503300 +0100
@@ -399,6 +399,19 @@
 return add;
 }
 
+/* map into the first apache */
+static int log_rotate_post_config( apr_pool_t * p, apr_pool_t * plog, apr_pool_t * ptemp, server_rec * s)
+{
+    ap_add_version_component(p, "mod_log_rotate/1.00");
+    return OK;
+}
+
+static void log_rotate_register_hooks(apr_pool_t *p)
+{
+    ap_hook_post_config( log_rotate_post_config,   NULL, NULL, APR_HOOK_MIDDLE );
+}
+
+
 module AP_MODULE_DECLARE_DATA log_rotate_module = {
 STANDARD20_MODULE_STUFF,
 NULL,                       /* create per-dir config */
@@ -406,6 +419,6 @@
 make_log_options,           /* server config */
 merge_log_options,          /* merge server config */
 rotate_log_cmds,            /* command apr_table_t */
-    NULL                        /* register hooks */
+    log_rotate_register_hooks   /* register hooks */
 };

Leave a Reply

Your email address will not be published. Required fields are marked *