You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2016/11/28 14:38:25 UTC
svn commit: r1771751 - in /tcl/rivet/trunk: ./ rivet/ src/mod_rivet_ng/
Author: mxmanghi
Date: Mon Nov 28 14:38:25 2016
New Revision: 1771751
URL: http://svn.apache.org/viewvc?rev=1771751&view=rev
Log:
* src/mod_rivet_ng/: new configuration directives
RequestHandler (request handling procedure), ImportRivetNS
and ExportRivetNS (override parameters for
build options). RequestHandler enables rivet
to run an application specific request handler.
* src/mod_rivet_ng/rivetInspect.c: now runs also
during the server initialization stage. The whole
rivet core is setup during that phase but only
a few commands are actually operational (most
of them make sense only during an HTTP request processing)
Modified:
tcl/rivet/trunk/ChangeLog
tcl/rivet/trunk/rivet/init.tcl
tcl/rivet/trunk/rivet/init.tcl.in
tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c
tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c
tcl/rivet/trunk/src/mod_rivet_ng/rivetInspect.c
tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c
Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Mon Nov 28 14:38:25 2016
@@ -1,3 +1,15 @@
+2016-11-28 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/: new configuration directives
+ RequestHandler (request handling procedure), ImportRivetNS
+ and ExportRivetNS (override parameters for
+ build options). RequestHandler enables rivet
+ to run an application specific request handler.
+ * src/mod_rivet_ng/rivetInspect.c: now runs also
+ during the server initialization stage. The whole
+ rivet core is setup during that phase but only
+ a few commands are actually operational (most
+ of them make sense only during an HTTP request processing)
+
2016-11-23 Massimo Manghi <mx...@apache.org>
* rivet/packages/form/form.tcl,form2.tcl: fix full
qualification of the ::rivet::lempty command
Modified: tcl/rivet/trunk/rivet/init.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/init.tcl?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/init.tcl (original)
+++ tcl/rivet/trunk/rivet/init.tcl Mon Nov 28 14:38:25 2016
@@ -47,9 +47,10 @@ proc ::Rivet::init {} {
## Importing the ::rivet namespace is deprecated and we should
## make it clear in the manual.
- set ::rivet::cmd_export_list [tcl_commands_export_list $::Rivet::rivet_tcl]
- if {[info exists ::module_conf(export_namespace_commands)]
- && $::module_conf(export_namespace_commands)} {
+ if {([::rivet::inspect ExportRivetNS] == 1) || \
+ ([::rivet::inspect ImportRivetNS] == 1)} {
+
+ set ::rivet::cmd_export_list [tcl_commands_export_list $::Rivet::rivet_tcl]
## init.tcl is run by mod_rivet (which creates the ::rivet
## namespace) but it gets run standalone by mkPkgindex during
@@ -78,8 +79,7 @@ proc ::Rivet::init {} {
## If Rivet was configured for backward compatibility, import commands
## from the ::rivet namespace into the global namespace.
- if {[info exists ::module_conf(import_rivet_commands)]
- && $::module_conf(import_rivet_commands)} {
+ if {[::rivet::inspect ImportRivetNS] == 1} {
uplevel #0 { namespace import ::rivet::* }
}
unset -nocomplain ::module_conf
@@ -126,6 +126,8 @@ proc ::Rivet::handle_error {} {
## other bits and calls them in order.
proc ::Rivet::request_handling {} {
+
+ catch {uplevel #0 ::Rivet::initialize_request}
::try {
set script [::rivet::inspect BeforeScript]
if {$script ne ""} {
Modified: tcl/rivet/trunk/rivet/init.tcl.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/init.tcl.in?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/init.tcl.in (original)
+++ tcl/rivet/trunk/rivet/init.tcl.in Mon Nov 28 14:38:25 2016
@@ -47,9 +47,10 @@ proc ::Rivet::init {} {
## Importing the ::rivet namespace is deprecated and we should
## make it clear in the manual.
- set ::rivet::cmd_export_list [tcl_commands_export_list $::Rivet::rivet_tcl]
- if {[info exists ::module_conf(export_namespace_commands)]
- && $::module_conf(export_namespace_commands)} {
+ if {([::rivet::inspect ExportRivetNS] == 1) || \
+ ([::rivet::inspect ImportRivetNS] == 1)} {
+
+ set ::rivet::cmd_export_list [tcl_commands_export_list $::Rivet::rivet_tcl]
## init.tcl is run by mod_rivet (which creates the ::rivet
## namespace) but it gets run standalone by mkPkgindex during
@@ -78,11 +79,10 @@ proc ::Rivet::init {} {
## If Rivet was configured for backward compatibility, import commands
## from the ::rivet namespace into the global namespace.
- if {[info exists ::module_conf(import_rivet_commands)]
- && $::module_conf(import_rivet_commands)} {
+ if {[::rivet::inspect ImportRivetNS] == 1} {
uplevel #0 { namespace import ::rivet::* }
}
- unset -nocomplain ::module_conf
+ #unset -nocomplain ::module_conf
}
###
@@ -126,6 +126,8 @@ proc ::Rivet::handle_error {} {
## other bits and calls them in order.
proc ::Rivet::request_handling {} {
+
+ catch {uplevel #0 ::Rivet::initialize_request}
::try {
set script [::rivet::inspect BeforeScript]
if {$script ne ""} {
Modified: tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/apache_config.c Mon Nov 28 14:38:25 2016
@@ -118,6 +118,8 @@ Rivet_SetScript (apr_pool_t *pool, rivet
c = &rsc->rivet_child_init_script;
} else if ( STREQU( script, "ChildExitScript" ) ) {
c = &rsc->rivet_child_exit_script;
+ } else if ( STREQU( script, "RequestHandler" ) ) {
+ c = &rsc->request_handler;
} else if ( STREQU( script, "BeforeScript" ) ) {
c = &rsc->rivet_before_script;
} else if ( STREQU( script, "AfterScript" ) ) {
@@ -210,6 +212,7 @@ Rivet_CopyConfig( rivet_server_conf *old
newrsc->rivet_server_init_script = oldrsc->rivet_server_init_script;
newrsc->rivet_global_init_script = oldrsc->rivet_global_init_script;
+ newrsc->request_handler = oldrsc->request_handler;
newrsc->rivet_before_script = oldrsc->rivet_before_script;
newrsc->rivet_after_script = oldrsc->rivet_after_script;
newrsc->rivet_error_script = oldrsc->rivet_error_script;
@@ -221,6 +224,8 @@ Rivet_CopyConfig( rivet_server_conf *old
newrsc->upload_max = oldrsc->upload_max;
newrsc->upload_files_to_var = oldrsc->upload_files_to_var;
newrsc->separate_virtual_interps = oldrsc->separate_virtual_interps;
+ newrsc->export_rivet_ns = oldrsc->export_rivet_ns;
+ newrsc->import_rivet_ns = oldrsc->import_rivet_ns;
newrsc->honor_header_only_reqs = oldrsc->honor_header_only_reqs;
newrsc->separate_channels = oldrsc->separate_channels;
newrsc->server_name = oldrsc->server_name;
@@ -273,6 +278,8 @@ Rivet_MergeDirConfigVars(apr_pool_t *p,
add->rivet_child_init_script : base->rivet_child_init_script;
new->rivet_child_exit_script = add->rivet_child_exit_script ?
add->rivet_child_exit_script : base->rivet_child_exit_script;
+ new->request_handler = add->request_handler ?
+ add->request_handler : base->request_handler;
new->rivet_before_script = add->rivet_before_script ?
add->rivet_before_script : base->rivet_before_script;
@@ -406,6 +413,7 @@ Rivet_MergeConfig(apr_pool_t *p, void *b
RIVET_CONF_SELECT(rsc,base,overrides,rivet_child_init_script)
RIVET_CONF_SELECT(rsc,base,overrides,rivet_child_exit_script)
+ RIVET_CONF_SELECT(rsc,base,overrides,request_handler)
RIVET_CONF_SELECT(rsc,base,overrides,rivet_before_script)
RIVET_CONF_SELECT(rsc,base,overrides,rivet_after_script)
RIVET_CONF_SELECT(rsc,base,overrides,rivet_error_script)
@@ -417,6 +425,8 @@ Rivet_MergeConfig(apr_pool_t *p, void *b
rsc->separate_virtual_interps = base->separate_virtual_interps;
rsc->honor_header_only_reqs = base->honor_header_only_reqs;
rsc->separate_channels = base->separate_channels;
+ rsc->import_rivet_ns = base->import_rivet_ns;
+ rsc->export_rivet_ns = base->export_rivet_ns;
rsc->mpm_bridge = base->mpm_bridge;
rsc->upload_max = base->upload_max;
rsc->upload_dir = base->upload_dir;
@@ -454,6 +464,7 @@ Rivet_CreateConfig(apr_pool_t *p, server
rsc->rivet_child_init_script = NULL;
rsc->rivet_child_exit_script = NULL;
rsc->rivet_before_script = NULL;
+ rsc->request_handler = "::Rivet::request_handling";
rsc->rivet_after_script = NULL;
rsc->rivet_error_script = NULL;
rsc->rivet_abort_script = NULL;
@@ -467,6 +478,8 @@ Rivet_CreateConfig(apr_pool_t *p, server
rsc->upload_max = RIVET_MAX_POST;
rsc->upload_files_to_var = RIVET_UPLOAD_FILES_TO_VAR;
rsc->separate_virtual_interps = RIVET_SEPARATE_VIRTUAL_INTERPS;
+ rsc->export_rivet_ns = RIVET_NAMESPACE_EXPORT;
+ rsc->import_rivet_ns = RIVET_NAMESPACE_IMPORT;
rsc->honor_header_only_reqs = RIVET_HEAD_REQUESTS;
rsc->separate_channels = RIVET_SEPARATE_CHANNELS;
rsc->upload_dir = RIVET_UPLOAD_DIR;
@@ -648,6 +661,10 @@ Rivet_ServerConf(cmd_parms *cmd,void *du
Tcl_GetBoolean (NULL, val, &rsc->separate_channels);
} else if ( STREQU ( var, "MpmBridge" ) ) {
rsc->mpm_bridge = val;
+ } else if ( STREQU (var, "ImportRivetNS")) {
+ Tcl_GetBoolean (NULL,val, &rsc->import_rivet_ns);
+ } else if ( STREQU (var,"ExportRivetNS")) {
+ Tcl_GetBoolean (NULL, val, &rsc->export_rivet_ns);
} else {
string = Rivet_SetScript( cmd->pool, rsc, var, val);
}
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet.h Mon Nov 28 14:38:25 2016
@@ -91,12 +91,17 @@ typedef struct _rivet_server_conf {
char* rivet_global_init_script; /* run once when apache is started */
char* rivet_child_init_script;
char* rivet_child_exit_script;
- char* rivet_before_script; /* script run before each page */
- char* rivet_after_script; /* after */
+ char* request_handler; /* request handler script */
char* rivet_error_script; /* for errors */
char* rivet_abort_script; /* script run upon abort_page call */
char* after_every_script; /* script to be always run */
- //char* rivet_default_error_script; /* for errors */
+
+ /* these scripts are kept for compatibility. They may disappear in future versions */
+
+ char* rivet_before_script; /* script run before each page */
+ char* rivet_after_script; /* after */
+
+ /* --------------------------------------------------------------------------- */
/* This flag is used with the above directives. If any of them have changed, it gets set. */
@@ -108,6 +113,9 @@ typedef struct _rivet_server_conf {
int separate_virtual_interps;
int honor_header_only_reqs;
int separate_channels; /* when true a vhosts get their private channel */
+ int export_rivet_ns; /* export the ::rivet namespace commands */
+ int import_rivet_ns; /* import into the global namespace the
+ exported ::rivet commands */
char* server_name;
const char* upload_dir;
apr_table_t* rivet_server_vars;
@@ -131,6 +139,7 @@ typedef struct _rivet_server_conf {
#define RIVET_INTERP_INITIALIZED 2
typedef struct _interp_running_scripts {
+ Tcl_Obj* request_processing; /* request processing central procedure */
Tcl_Obj* rivet_before_script; /* script run before each page */
Tcl_Obj* rivet_after_script; /* after */
Tcl_Obj* rivet_error_script;
@@ -199,8 +208,7 @@ typedef struct _thread_worker_private {
rivet_req_ctype ctype; /* */
request_rec* r; /* current request_rec */
TclWebRequest* req;
- Tcl_Obj* request_init;
- Tcl_Obj* request_processing; /* request processing central procedure */
+ //Tcl_Obj* request_init;
Tcl_Obj* request_cleanup;
rivet_server_conf* running_conf; /* running configuration */
running_scripts* running; /* (per request) running conf scripts */
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c Mon Nov 28 14:38:25 2016
@@ -96,7 +96,16 @@ running_scripts* Rivet_RunningScripts (a
RIVET_SCRIPT_INIT (pool,scripts,rivet_conf,rivet_error_script);
RIVET_SCRIPT_INIT (pool,scripts,rivet_conf,rivet_abort_script);
RIVET_SCRIPT_INIT (pool,scripts,rivet_conf,after_every_script);
-
+ /*
+ if (rivet_conf->request_handler == NULL)
+ {
+ scripts->request_processing = Tcl_NewStringObj(RIVET_CR_TERM(pool,"::Rivet::request_handling\n"),-1);
+ } else {
+ scripts->request_processing = Tcl_NewStringObj(rivet_conf->request_handler,-1);
+ } */
+ scripts->request_processing = Tcl_NewStringObj(rivet_conf->request_handler,-1);
+ Tcl_IncrRefCount(scripts->request_processing);
+
return scripts;
}
@@ -166,7 +175,7 @@ void Rivet_PerInterpInit(rivet_thread_in
Tcl_DecrRefCount(rivet_tcl);
/* Initialize the interpreter with Rivet's Tcl commands. */
- if (private != NULL) Rivet_InitCore(interp,private);
+ Rivet_InitCore(interp,private);
/* Create a global array with information about the server. */
Rivet_InitServerVariables(interp,p);
@@ -189,8 +198,8 @@ void Rivet_PerInterpInit(rivet_thread_in
* This array will be unset after commands are exported.
*/
- Tcl_SetVar2Ex(interp,"module_conf","export_namespace_commands",Tcl_NewIntObj(RIVET_NAMESPACE_EXPORT),0);
- Tcl_SetVar2Ex(interp,"module_conf","import_rivet_commands",Tcl_NewIntObj(RIVET_NAMESPACE_IMPORT),0);
+ //Tcl_SetVar2Ex(interp,"module_conf","export_namespace_commands",Tcl_NewIntObj(RIVET_NAMESPACE_EXPORT),0);
+ //Tcl_SetVar2Ex(interp,"module_conf","import_rivet_commands",Tcl_NewIntObj(RIVET_NAMESPACE_IMPORT),0);
/* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
@@ -393,15 +402,15 @@ rivet_thread_private* Rivet_CreatePrivat
}
private->req_cnt = 0;
private->r = NULL;
- private->req = TclWeb_NewRequestObject (private->pool);
+ private->req = TclWeb_NewRequestObject(private->pool);
private->page_aborting = 0;
private->thread_exit = 0;
private->exit_status = 0;
private->abort_code = NULL;
- private->request_init = Tcl_NewStringObj("::Rivet::initialize_request\n", -1);
- Tcl_IncrRefCount(private->request_init);
- private->request_processing = Tcl_NewStringObj("::Rivet::request_handling\n",-1);
- Tcl_IncrRefCount(private->request_processing);
+ //private->request_init = Tcl_NewStringObj("::Rivet::initialize_request\n", -1);
+ //Tcl_IncrRefCount(private->request_init);
+ //private->request_processing = Tcl_NewStringObj("::Rivet::request_handling\n",-1);
+ //Tcl_IncrRefCount(private->request_processing);
//private->request_cleanup = Tcl_NewStringObj("::Rivet::cleanup_request\n", -1);
//Tcl_IncrRefCount(private->request_cleanup);
//private->default_error_script = Tcl_NewStringObj("::Rivet::handle_error\n",-1);
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_generator.c Mon Nov 28 14:38:25 2016
@@ -255,6 +255,7 @@ Rivet_SendContent(rivet_thread_private *
goto sendcleanup;
}
+ /*
if (Tcl_EvalObjEx(interp, private->request_init, 0) == TCL_ERROR)
{
request_rec* r = private->r;
@@ -266,6 +267,7 @@ Rivet_SendContent(rivet_thread_private *
retval = HTTP_INTERNAL_SERVER_ERROR;
goto sendcleanup;
}
+ */
/* Apache Request stuff */
@@ -304,7 +306,7 @@ Rivet_SendContent(rivet_thread_private *
/* URL referenced script execution and exception handling */
- if (Tcl_EvalObjEx(interp, private->request_processing,0) == TCL_ERROR)
+ if (Tcl_EvalObjEx(interp, private->running->request_processing,0) == TCL_ERROR)
//if (Rivet_ParseExecFile (private, private->r->filename, 1) != TCL_OK)
//if (Rivet_ExecuteAndCheck(private,private->request_processing) == TCL_ERROR)
{
Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c Mon Nov 28 14:38:25 2016
@@ -1542,7 +1542,7 @@ TCL_CMD_HEADER( Rivet_InspectCmd )
if (STRNEQU(cmd_arg,"script"))
{
- if (private->r == NULL)
+ if ((private == NULL) || (private->r == NULL))
{
Tcl_Obj* cmd = Tcl_NewStringObj("info script",-1);
@@ -1573,7 +1573,9 @@ TCL_CMD_HEADER( Rivet_InspectCmd )
Tcl_Obj* dictObj;
server_rec* srec;
- if (private->r == NULL) {
+ if (private == NULL) {
+ srec = module_globals->server;
+ } else if (private->r == NULL) {
srec = module_globals->server;
} else {
srec = private->r->server;
@@ -1600,8 +1602,16 @@ TCL_CMD_HEADER( Rivet_InspectCmd )
{
Tcl_Obj* par_value = NULL;
- CHECK_REQUEST_REC(private,"::rivet::inspect")
- rsc = Rivet_GetConf(private->r);
+ //CHECK_REQUEST_REC(private,"::rivet::inspect")
+ if (private == NULL)
+ {
+ rsc = RIVET_SERVER_CONF(module_globals->server->module_config);
+ } else if (private->r == NULL) {
+ rsc = RIVET_SERVER_CONF(module_globals->server->module_config);
+ } else {
+ rsc = Rivet_GetConf(private->r);
+ }
+
par_value = Rivet_ReadConfParameter(interp,rsc,par_name);
if (par_value == NULL)
{
@@ -1735,7 +1745,7 @@ TCL_CMD_HEADER( Rivet_LogErrorCmd )
/* if we are serving a page, we know our server,
* else send null for server
*/
- serverRec = (private->r == NULL) ? NULL : private->r->server;
+ serverRec = ((private == NULL) || (private->r == NULL)) ? module_globals->server : private->r->server;
ap_log_error (APLOG_MARK, apLogLevel, 0, serverRec, "%s", message);
return TCL_OK;
@@ -1899,6 +1909,7 @@ TCL_CMD_HEADER( Rivet_UrlScript )
int
Rivet_InitCore(Tcl_Interp *interp,rivet_thread_private* private)
{
+ rivet_server_conf* server_conf;
#if RIVET_NAMESPACE_EXPORT == 1
#endif
@@ -1929,7 +1940,15 @@ Rivet_InitCore(Tcl_Interp *interp,rivet_
RIVET_OBJ_CMD ("testpanic",TestpanicCmd,private);
#endif
-#if RIVET_NAMESPACE_EXPORT == 1
+ /*
+ * we don't need to check the virtual host server conf
+ * stored in 'private' in order to determine if we are
+ * export the command names, as this flag is meaningful
+ * at the global level
+ */
+ server_conf = RIVET_SERVER_CONF(module_globals->server->module_config);
+
+ if (server_conf->export_rivet_ns)
{
rivet_interp_globals *globals = NULL;
Tcl_Namespace *rivet_ns;
@@ -1958,7 +1977,6 @@ Rivet_InitCore(Tcl_Interp *interp,rivet_
RIVET_EXPORT_CMD(interp,rivet_ns,"inspect");
// ::rivet::exit is not exported
}
-#endif
return TCL_OK;
}
Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivetInspect.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivetInspect.c?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivetInspect.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivetInspect.c Mon Nov 28 14:38:25 2016
@@ -59,6 +59,9 @@ static const char* confDirectives[] =
"SeparateChannels",
"HonorHeaderOnlyRequests",
"MpmBridge",
+ "RequestHandler",
+ "ExportRivetNS",
+ "ImportRivetNS",
NULL
};
@@ -79,6 +82,9 @@ enum confIndices {
separate_channels,
honor_header_only_requests,
mpm_bridge,
+ request_handler,
+ export_rivet_ns,
+ import_rivet_ns,
conf_index_terminator
};
@@ -126,6 +132,7 @@ Rivet_ReadConfParameter ( Tcl_Interp*
case global_init_script: string_value = rsc->rivet_global_init_script; break;
case child_init_script: string_value = rsc->rivet_child_init_script; break;
case child_exit_script: string_value = rsc->rivet_child_exit_script; break;
+ case request_handler: string_value = rsc->request_handler; break;
case before_script: string_value = rsc->rivet_before_script; break;
case after_script: string_value = rsc->rivet_after_script; break;
case after_every_script: string_value = rsc->after_every_script; break;
@@ -138,19 +145,20 @@ Rivet_ReadConfParameter ( Tcl_Interp*
case separate_virtual_interps: int_value = Tcl_NewIntObj(rsc->separate_virtual_interps); break;
case separate_channels: int_value = Tcl_NewIntObj(rsc->separate_channels); break;
case honor_header_only_requests: int_value = Tcl_NewIntObj(rsc->honor_header_only_reqs); break;
+ case export_rivet_ns: int_value = Tcl_NewIntObj(rsc->export_rivet_ns); break;
+ case import_rivet_ns: int_value = Tcl_NewIntObj(rsc->import_rivet_ns); break;
default: return NULL;
}
+ /* this case is a bit convoluted and needs a more linear coding.
+ * Basically: if the function hasn't returned (default branch in the 'switch' selector)
+ * that means the arguent was valid. Since any integer parameter would produce a valid Tcl_Obj
+ * pointer if both the int_value and string_value pointers are NULL that means the value
+ * was a NULL pointer to a string value. We therefore return an empty string
+ */
if ((string_value == NULL) && (int_value == NULL))
{
- /* this case is a bit convoluted and needs a more linear coding.
- * Basically: if the function hasn't returned (default branch in the 'switch' selector)
- * that means the arguent was valid. Since any integer parameter would produce a valid Tcl_Obj
- * pointer if both the int_value and string_value pointers are NULL that means the value
- * was a NULL pointer to a string value. We therefore return an empty string
- */
-
return Tcl_NewStringObj("",-1);
}
else if (string_value != NULL)
Modified: tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c?rev=1771751&r1=1771750&r2=1771751&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/worker_prefork_common.c Mon Nov 28 14:38:25 2016
@@ -313,7 +313,7 @@ void Rivet_ProcessorCleanup (void *data)
} while ((++i < module_globals->vhosts_count) && rsc->separate_virtual_interps);
- Tcl_DecrRefCount(private->request_init);
+ //Tcl_DecrRefCount(private->request_init);
//Tcl_DecrRefCount(private->request_cleanup);
apr_pool_destroy(private->pool);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org