You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ia...@apache.org on 2003/02/14 05:17:34 UTC
cvs commit: httpd-2.0/modules/loggers mod_log_config.c mod_log_config.h
ianh 2003/02/13 20:17:34
Modified: include ap_mmn.h
modules/loggers mod_log_config.c mod_log_config.h
Log:
change optional function to return the previous writer, allowing to have mutliple types
of writers in the same server. (previously you could only have one)
it needs a mmn bump.. sorry guys
;(
Revision Changes Path
1.56 +2 -1 httpd-2.0/include/ap_mmn.h
Index: ap_mmn.h
===================================================================
RCS file: /home/cvs/httpd-2.0/include/ap_mmn.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- ap_mmn.h 3 Feb 2003 17:52:53 -0000 1.55
+++ ap_mmn.h 14 Feb 2003 04:17:34 -0000 1.56
@@ -112,12 +112,13 @@
* 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 */
1.99 +10 -4 httpd-2.0/modules/loggers/mod_log_config.c
Index: mod_log_config.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/loggers/mod_log_config.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- mod_log_config.c 13 Feb 2003 13:54:04 -0000 1.98
+++ mod_log_config.c 14 Feb 2003 04:17:34 -0000 1.99
@@ -230,8 +230,8 @@
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 */
@@ -1223,14 +1223,20 @@
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,
1.7 +2 -2 httpd-2.0/modules/loggers/mod_log_config.h
Index: mod_log_config.h
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/loggers/mod_log_config.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mod_log_config.h 3 Feb 2003 17:53:05 -0000 1.6
+++ mod_log_config.h 14 Feb 2003 04:17:34 -0000 1.7
@@ -96,10 +96,10 @@
* 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 */
Re: cvs commit: httpd-2.0/modules/loggers mod_log_config.c mod_log_config.h
Posted by Ian Holsman <li...@holsman.net>.
On Thu, 13 Feb 2003 20:42:30 -0800, Roy T. Fielding wrote:
>> change optional function to return the previous writer, allowing to
>> have mutliple types
>> of writers in the same server. (previously you could only have one)
>>
>> it needs a mmn bump.. sorry guys
>
> Umm, okay, I give up... why does it need a major bump? Would older
> modules
> really blow up because of this change? I'm curious if it has something to
> do with the nature of the optional hook macro.
>
> ....Roy
I thought everytime you changed a external interface to a function you
needed to bump it.
I don't think anything out there actually uses the hook as-is so it has a
very low impact to most people, so I would be ok without the mmn bump too.
Re: cvs commit: httpd-2.0/modules/loggers mod_log_config.c mod_log_config.h
Posted by "Roy T. Fielding" <fi...@apache.org>.
> change optional function to return the previous writer, allowing to
> have mutliple types
> of writers in the same server. (previously you could only have one)
>
> it needs a mmn bump.. sorry guys
Umm, okay, I give up... why does it need a major bump? Would older
modules
really blow up because of this change? I'm curious if it has something
to do with the nature of the optional hook macro.
....Roy