of writers in the same server. (previously you could only have one)
it needs a mmn bump.. sorry guys
;(
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98648
13f79535-47bb-0310-9956-
ffa450edef68
* 20020628 (2.0.40-dev) Added filter_init to filter registration functions
* 20020903 (2.0.41-dev) APR's error constants changed
* 20020903.1 (2.1.0-dev) allow_encoded_slashes added to core_dir_config
+ * 20030213.1 (2.1.0-dev) changed log_writer optional fn's to return previous handler
*/
#define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20020903
+#define MODULE_MAGIC_NUMBER_MAJOR 20030213
#endif
#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
const char* name);
-static void ap_log_set_writer_init(ap_log_writer_init *handle);
-static void ap_log_set_writer(ap_log_writer *handle);
+static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle);
+static ap_log_writer* ap_log_set_writer(ap_log_writer *handle);
static ap_log_writer *log_writer = ap_default_log_writer;
static ap_log_writer_init *log_writer_init = ap_default_log_writer_init;
static int buffered_logs = 0; /* default unbuffered */
apr_hash_set(log_hash, tag, 1, (const void *)log_struct);
}
-static void ap_log_set_writer_init(ap_log_writer_init *handle)
+static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle)
{
+ ap_log_writer_init *old = log_writer_init;
log_writer_init = handle;
+ return old;
+
}
-static void ap_log_set_writer(ap_log_writer *handle)
+static ap_log_writer *ap_log_set_writer(ap_log_writer *handle)
{
+ ap_log_writer *old = log_writer;
log_writer = handle;
+
+ return old;
}
static apr_status_t ap_default_log_writer( request_rec *r,
* you will need to set your init handler *BEFORE* the open_logs
* in mod_log_config gets executed
*/
-APR_DECLARE_OPTIONAL_FN(void, ap_log_set_writer_init,(ap_log_writer_init *func));
+APR_DECLARE_OPTIONAL_FN(ap_log_writer_init*, ap_log_set_writer_init,(ap_log_writer_init *func));
/**
* you should probably set the writer at the same time (ie..before open_logs)
*/
-APR_DECLARE_OPTIONAL_FN(void, ap_log_set_writer, (ap_log_writer* func));
+APR_DECLARE_OPTIONAL_FN(ap_log_writer*, ap_log_set_writer, (ap_log_writer* func));
#endif /* MOD_LOG_CONFIG */