Mod Cplusplus CVS committal
Author : johnksterling
Project : mod_cplusplus
Module : src
Dir : mod_cplusplus/src
Modified Files:
apache_handler.cpp mod_cplusplus.c
Log Message:
add support for passing server rec to the constructors. This allow the contructors to initialize things instead of the past technique of lazy initializing. This change will not be backward compatibile - so existing modules will need to be upgraded
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/src/apache_handler.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- apache_handler.cpp 7 Aug 2005 20:24:50 -0000 1.17
+++ apache_handler.cpp 21 Jan 2006 21:45:36 -0000 1.18
@@ -120,12 +120,12 @@
return APR_SUCCESS;
}
- char *load_cpp_module( apr_pool_t *pool, cpp_server_rec *server_rec,
+ char *load_cpp_module( apr_pool_t *pool, server_rec *server, cpp_server_rec *server_rec,
const char *name, const char *path)
{
apr_dso_handle_t *sohandle;
apr_dso_handle_sym_t sosymbol;
-
+ ApacheServerRec *pServer = new ApacheServerRec(server);
cpp_factory_t *cur_handler;
if ( apr_dso_load(&sohandle, path, pool) != APR_SUCCESS ) {
char my_error[256];
@@ -155,13 +155,13 @@
cur_handler = (cpp_factory_t *) sosymbol;
ApacheHandler *handler = cur_handler->handler_func ?
- cur_handler->handler_func() : NULL;
+ cur_handler->handler_func(pServer) : NULL;
ApacheInputFilter *input_filter = cur_handler->input_filter_func ?
- cur_handler->input_filter_func() : NULL;
+ cur_handler->input_filter_func(pServer) : NULL;
ApacheOutputFilter *output_filter = cur_handler->output_filter_func ?
- cur_handler->output_filter_func() : NULL;
+ cur_handler->output_filter_func(pServer) : NULL;
ApacheProtocol *protocol = cur_handler->protocol_func ?
- cur_handler->protocol_func() : NULL;
+ cur_handler->protocol_func(pServer) : NULL;
if( handler != NULL ) {
apr_hash_set(server_rec->handler_hash,
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/src/mod_cplusplus.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- mod_cplusplus.c 14 Dec 2004 13:17:04 -0000 1.21
+++ mod_cplusplus.c 21 Jan 2006 21:45:36 -0000 1.22
@@ -72,7 +72,7 @@
ap_get_module_config(cmd->server->module_config,
&cplusplus_module);
- return load_cpp_module(cmd->server->process->pool, server_rec, name, path_to_so);
+ return load_cpp_module(cmd->server->process->pool, cmd->server, server_rec, name, path_to_so);
}
static const char *pass_server_var(cmd_parms *cmd, void *config,
|