You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2003/02/13 08:29:28 UTC
cvs commit: tcl-rivet/src mod_rivet.c
davidw 2003/02/12 23:29:28
Modified: . ChangeLog
src mod_rivet.c
Log:
* src/mod_rivet.c: Mirror Craig Huckabee's mod_dtcl.c changes:
- Use TCL_DECLARE_MUTEX to create the mutex, and change the mutex
lock/unlock calls.
- Remove the 'load only once' stuff from TclInitStuff.
- InitTclStuff can now only be called from Child Init.
Revision Changes Path
1.96 +11 -0 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- ChangeLog 17 Jan 2003 20:21:26 -0000 1.95
+++ ChangeLog 13 Feb 2003 07:29:28 -0000 1.96
@@ -1,3 +1,14 @@
+2003-02-12 David N. Welton <da...@dedasys.com>
+
+ * src/mod_rivet.c: Mirror Craig Huckabee's mod_dtcl.c changes:
+
+ - Use TCL_DECLARE_MUTEX to create the mutex, and change the mutex
+ lock/unlock calls.
+
+ - Remove the 'load only once' stuff from TclInitStuff.
+
+ - InitTclStuff can now only be called from Child Init.
+
2003-01-17 David N. Welton <da...@dedasys.com>
* Added logos.
1.58 +7 -21 tcl-rivet/src/mod_rivet.c
Index: mod_rivet.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- mod_rivet.c 9 Jan 2003 04:33:51 -0000 1.57
+++ mod_rivet.c 13 Feb 2003 07:29:28 -0000 1.58
@@ -90,7 +90,7 @@
/* Need some arbitrary non-NULL pointer which can't also be a request_rec */
#define NESTED_INCLUDE_MAGIC (&rivet_module)
-static Tcl_Condition *sendMutex;
+TCL_DECLARE_MUTEX(sendMutex);
static void Rivet_InitTclStuff(server_rec *s, pool *p);
static void Rivet_CopyConfig( rivet_server_conf *oldrsc,
@@ -384,7 +384,7 @@
rivet_server_conf *rsc = NULL;
rivet_server_conf *rdc;
- Tcl_MutexLock(sendMutex);
+ Tcl_MutexLock(&sendMutex);
rsc = Rivet_GetConf(r);
interp = rsc->server_interp;
@@ -491,7 +491,7 @@
sendcleanup:
globals->req->content_sent = 0;
- Tcl_MutexUnlock(sendMutex);
+ Tcl_MutexUnlock(&sendMutex);
return retval;
}
@@ -595,16 +595,6 @@
rivet_server_conf *rsc = RIVET_SERVER_CONF( s->module_config );
server_rec *sr;
- /* Apache actually loads all the modules twice, just to see if it
- * can. This is a pain, because things don't seem to get
- * completely cleaned up on the Tcl side. So this little hack
- * should make us *really* load only the second time around. */
-
- if (getenv("RIVET_INIT") == NULL) {
- setenv("RIVET_INIT", "1", 0);
- return;
- }
-
/* Initialize TCL stuff */
Tcl_FindExecutable(NULL);
interp = Tcl_CreateInterp();
@@ -646,7 +636,9 @@
/* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
if( Tcl_EvalFile( interp, ap_server_root_relative(p, RIVET_INIT) )
== TCL_ERROR ) {
- ap_log_error( APLOG_MARK, APLOG_ERR, s, "init.tcl must be installed correctly for Apache Rivet to function: %s", Tcl_GetStringResult(interp) );
+ ap_log_error( APLOG_MARK, APLOG_ERR, s,
+ "init.tcl must be installed correctly for Apache Rivet to function: %s",
+ Tcl_GetStringResult(interp) );
exit(1);
}
@@ -1090,9 +1082,7 @@
server_rec *sr;
rivet_server_conf *rsc;
-#if THREADED_TCL == 1
Rivet_InitTclStuff(s, p);
-#endif
sr = s;
while(sr)
@@ -1134,10 +1124,6 @@
MODULE_VAR_EXPORT void
Rivet_InitHandler(server_rec *s, pool *p)
{
-#if THREADED_TCL == 0
- Rivet_InitTclStuff(s, p);
-#endif
-
#ifndef HIDE_RIVET_VERSION
ap_add_version_component("Rivet / "RIVET_VERSION);
#else
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org