You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/11/01 19:07:53 UTC
cvs commit: httpd-2.0/modules/loggers mod_logio.c
wrowe 2002/11/01 10:07:53
Modified: os/win32 BaseAddr.ref
modules/loggers mod_logio.c
Log:
Well that was a little borked, if you were having stack problems using
logio the missing pre_connection hook declartion could have something
to do with it.
Revision Changes Path
1.22 +1 -0 httpd-2.0/os/win32/BaseAddr.ref
Index: BaseAddr.ref
===================================================================
RCS file: /home/cvs/httpd-2.0/os/win32/BaseAddr.ref,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- BaseAddr.ref 14 Sep 2002 16:34:16 -0000 1.21
+++ BaseAddr.ref 1 Nov 2002 18:07:52 -0000 1.22
@@ -60,3 +60,4 @@
mod_authz_groupfile 0x6FB10000 0x00010000
mod_authz_host 0x6FB00000 0x00010000
mod_authz_user 0x6FAF0000 0x00010000
+mod_logio 0x6FAE0000 0x00010000
1.3 +2 -1 httpd-2.0/modules/loggers/mod_logio.c
Index: mod_logio.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/loggers/mod_logio.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mod_logio.c 25 Oct 2002 06:52:02 -0000 1.2
+++ mod_logio.c 1 Nov 2002 18:07:52 -0000 1.3
@@ -81,6 +81,7 @@
#include "httpd.h"
#include "http_core.h"
#include "http_config.h"
+#include "http_connection.h"
#include "http_protocol.h"
module AP_MODULE_DECLARE_DATA logio_module;
@@ -182,7 +183,7 @@
* The hooks...
*/
-static int logio_pre_conn(conn_rec *c) {
+static int logio_pre_conn(conn_rec *c, void *csd) {
logio_config_t *cf = apr_pcalloc(c->pool, sizeof(*cf));
ap_set_module_config(c->conn_config, &logio_module, cf);
Re: my module works?
Posted by Dirk-Willem van Gulik <di...@webweaving.org>.
On Wed, 6 Nov 2002, [iso-8859-1] fabio rohrich wrote:
> I'm starting to write the mod_blank (it'll interact
> with the response phase).
> I'm writing the module structures and in want to know
> if it works good. I mean, I 'll write a stupid
> functiuon that wiil add at the bottom of a web page a
> written, just to check if my module is linked good and
> so on...
> I haven't a server at home , but I have apache on my
> Linux station.
That is fine.
> How can I check that my module works good?
Write the module; insert it into apache wiht 'LoadModule' and point your
webbrowser at http://localhost/. You propably want to do this in small
steps:
1 set up apache on your pc at home
2 check that it works
3 change index.html and check that you see
the change.
4 take mod_example and compile it and install it
check that it works
5 then hack mod_example and compile it and install it
and check that it works..
before starting to hack your own.
http://www.apache.org/~dirkx/oscon2002/
has a presentation on writing modules for apache. Google will find more of
them.
Dw.
my module works?
Posted by fabio rohrich <ro...@yahoo.it>.
hi!
I'm starting to write the mod_blank (it'll interact
with the response phase).
I'm writing the module structures and in want to know
if it works good. I mean, I 'll write a stupid
functiuon that wiil add at the bottom of a web page a
written, just to check if my module is linked good and
so on...
I haven't a server at home , but I have apache on my
Linux station.
How can I check that my module works good?
Thanks,
Fabio
______________________________________________________________________
Mio Yahoo!: personalizza Yahoo! come piace a te
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/
Re: cvs commit: httpd-2.0/modules/loggers mod_logio.c
Posted by "William A. Rowe, Jr." <wr...@apache.org>.
At 02:50 PM 11/1/2002, Greg Stein wrote:
>On Fri, Nov 01, 2002 at 06:07:53PM -0000, wrowe@apache.org wrote:
>>...
>> +++ BaseAddr.ref 1 Nov 2002 18:07:52 -0000 1.22
>> @@ -60,3 +60,4 @@
>> mod_authz_groupfile 0x6FB10000 0x00010000
>> mod_authz_host 0x6FB00000 0x00010000
>> mod_authz_user 0x6FAF0000 0x00010000
>> +mod_logio 0x6FAE0000 0x00010000
>
>For efficiency purposes, those numbers should be as close together as
>possible. There is some cost to the gaps between a module and the next one
>(and/or the overall mapped space). If in the future, a module grows and
>causes an overlap, then it merely causes a relocation at load time. So there
>isn't a worry about that.
Yes, there is. Data points that for whatever reason are not declared
correctly with AP_DECLARE_DATA cannot be relocated, thus they
cause a segv when the module relocates.
There is another option, which is to rebase all DLLs after the server is
configured, based on the modules actually loaded. I'll investigate that
as an option.
>I don't recall how to find the size of the module; only that the gaps are to
>be avoided. You could also set yourself a periodic six month reminder to
>reexamine the sizes.
Of course. Within a given release, we want to keep them static. When
we go to release 2.2 (and folks can no longer load something like logio
built on 2.0.44-dev into a 2.0.43 server) then we rebase them all, accounting
for the big movement in the new authz schema.
And yes - I'll look at the core modules we load 'by default' and regroup
them together.
Bill
Re: cvs commit: httpd-2.0/modules/loggers mod_logio.c
Posted by Greg Marr <gr...@alum.wpi.edu>.
At 03:50 PM 11/1/2002, Greg Stein wrote:
>On Fri, Nov 01, 2002 at 06:07:53PM -0000, wrowe@apache.org wrote:
> >...
> > +++ BaseAddr.ref 1 Nov 2002 18:07:52 -0000 1.22
> > @@ -60,3 +60,4 @@
> > mod_authz_groupfile 0x6FB10000 0x00010000
> > mod_authz_host 0x6FB00000 0x00010000
> > mod_authz_user 0x6FAF0000 0x00010000
> > +mod_logio 0x6FAE0000 0x00010000
>
>For efficiency purposes, those numbers should be as close together
>as possible.
FYI, these are as close together as possible. You can't specify the
addresses with any finer granularity than 0x10000.
>I don't recall how to find the size of the module;
If you're on WinNT, you can use Quick View. I'm not sure in Win2K,
other than just checking the size of the executable in Windows
Explorer. Also, the reason for the 0x00010000 at the end of the line
is so the linker knows how much space you've allocated for the
module. If it module is larger than that size, a warning will be
issued at link time.
--
Greg Marr
gregm@alum.wpi.edu
Re: cvs commit: httpd-2.0/modules/loggers mod_logio.c
Posted by Bojan Smojver <bo...@rexursive.com>.
OOPS, sorry. I was following the mod_apachecon.c, which seems a bit out
of date :-(
Bojan
On Sat, 2002-11-02 at 05:07, wrowe@apache.org wrote:
> wrowe 2002/11/01 10:07:53
>
> Modified: os/win32 BaseAddr.ref
> modules/loggers mod_logio.c
> Log:
> Well that was a little borked, if you were having stack problems using
> logio the missing pre_connection hook declartion could have something
> to do with it.
>
> Revision Changes Path
> 1.22 +1 -0 httpd-2.0/os/win32/BaseAddr.ref
>
> Index: BaseAddr.ref
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/os/win32/BaseAddr.ref,v
> retrieving revision 1.21
> retrieving revision 1.22
> diff -u -r1.21 -r1.22
> --- BaseAddr.ref 14 Sep 2002 16:34:16 -0000 1.21
> +++ BaseAddr.ref 1 Nov 2002 18:07:52 -0000 1.22
> @@ -60,3 +60,4 @@
> mod_authz_groupfile 0x6FB10000 0x00010000
> mod_authz_host 0x6FB00000 0x00010000
> mod_authz_user 0x6FAF0000 0x00010000
> +mod_logio 0x6FAE0000 0x00010000
>
>
>
> 1.3 +2 -1 httpd-2.0/modules/loggers/mod_logio.c
>
> Index: mod_logio.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/modules/loggers/mod_logio.c,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -r1.2 -r1.3
> --- mod_logio.c 25 Oct 2002 06:52:02 -0000 1.2
> +++ mod_logio.c 1 Nov 2002 18:07:52 -0000 1.3
> @@ -81,6 +81,7 @@
> #include "httpd.h"
> #include "http_core.h"
> #include "http_config.h"
> +#include "http_connection.h"
> #include "http_protocol.h"
>
> module AP_MODULE_DECLARE_DATA logio_module;
> @@ -182,7 +183,7 @@
> * The hooks...
> */
>
> -static int logio_pre_conn(conn_rec *c) {
> +static int logio_pre_conn(conn_rec *c, void *csd) {
> logio_config_t *cf = apr_pcalloc(c->pool, sizeof(*cf));
>
> ap_set_module_config(c->conn_config, &logio_module, cf);
>
>
>
>
Re: cvs commit: httpd-2.0/modules/loggers mod_logio.c
Posted by Greg Stein <gs...@lyra.org>.
On Fri, Nov 01, 2002 at 06:07:53PM -0000, wrowe@apache.org wrote:
>...
> +++ BaseAddr.ref 1 Nov 2002 18:07:52 -0000 1.22
> @@ -60,3 +60,4 @@
> mod_authz_groupfile 0x6FB10000 0x00010000
> mod_authz_host 0x6FB00000 0x00010000
> mod_authz_user 0x6FAF0000 0x00010000
> +mod_logio 0x6FAE0000 0x00010000
For efficiency purposes, those numbers should be as close together as
possible. There is some cost to the gaps between a module and the next one
(and/or the overall mapped space). If in the future, a module grows and
causes an overlap, then it merely causes a relocation at load time. So there
isn't a worry about that.
I don't recall how to find the size of the module; only that the gaps are to
be avoided. You could also set yourself a periodic six month reminder to
reexamine the sizes.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/