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 ka...@apache.org on 2004/09/20 14:03:57 UTC

cvs commit: tcl-rivet/src mod_rivet.c

karl        2004/09/20 05:03:57

  Modified:    .        ChangeLog
               src      mod_rivet.c
  Log:
  Load the init.tcl file with an explicit path rather than using Tcl_PkgRequire.
  Previously, if Rivet was installed with a PREFIX/lib that wasn't already in
  Tcl's package search path (auto_path, probably because it was the same lib
  directory as Tcl used, typically /usr/local/lib), Tcl startup is unable to
  find the RivetTcl package, and Rivet is unable to start.
  
  It's also actually less overhead this way, but overhead is minimal anyway
  because this code only runs when new interpreters are created, typically
  only once per new child Apache process created.
  
  Revision  Changes    Path
  1.194     +9 -0      tcl-rivet/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/ChangeLog,v
  retrieving revision 1.193
  retrieving revision 1.194
  diff -u -r1.193 -r1.194
  --- ChangeLog	17 Sep 2004 22:58:33 -0000	1.193
  +++ ChangeLog	20 Sep 2004 12:03:56 -0000	1.194
  @@ -1,3 +1,12 @@
  +2004-09-20  Karl Lehenbauer  <ka...@sc.com>
  +	* src/mod_rivet.c (Rivet_PerInterpInit): Load the init.tcl file
  +	with an explicit path rather than using Tcl_PkgRequire.  Previously, 
  +	if Rivet was installed with a PREFIX/lib that wasn't already in
  +	Tcl's package search path (auto_path, probably because it was the
  +	same lib directory as Tcl used, typically /usr/local/lib), Tcl
  +	startup is unable to find the RivetTcl package, and Rivet is
  +	unable to start.  
  +
   2004-09-17  Karl Lehenbauer  <ka...@sc.com>
   	* rivet/packages/rivet/pkgIndex.tcl:  Removed.  It had a hard-coded
   	assumption about the shared library extensions (.so).  This file is
  
  
  
  1.73      +5 -4      tcl-rivet/src/mod_rivet.c
  
  Index: mod_rivet.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- mod_rivet.c	5 Apr 2004 10:40:42 -0000	1.72
  +++ mod_rivet.c	20 Sep 2004 12:03:57 -0000	1.73
  @@ -635,16 +635,17 @@
       Tcl_SetAssocData(interp, "rivet", NULL, globals);
   
       /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
  -    if( Tcl_PkgRequire(interp, "RivetTcl", "1.1", 1) == NULL ) {
  +     if (Tcl_Eval (interp, "source $::server(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) );
   	exit(1);
       }
   
  -    /* We use the largest allowed value, so that we shouldn't normally
  -     * send anything unless the user flushes it, or the page is
  -     * ready. */
  +    /* Set the output buffer size to the largest allowed value, so that we 
  +     * won't send any result packets to the browser unless the Rivet
  +     * programmer does a "flush stdout" or the page is completed.
  +     */
       Tcl_SetChannelOption(interp, *(rsc->outchannel), "-buffersize", "1000000");
       Tcl_RegisterChannel(interp, *(rsc->outchannel));
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org