You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(54) |
Feb
(71) |
Mar
(93) |
Apr
(48) |
May
(53) |
Jun
(33) |
Jul
(19) |
Aug
(39) |
Sep
(35) |
Oct
(36) |
Nov
(33) |
Dec
(13) |
2004 |
Jan
(10) |
Feb
(1) |
Mar
(17) |
Apr
(9) |
May
(40) |
Jun
(132) |
Jul
(133) |
Aug
(178) |
Sep
(104) |
Oct
(31) |
Nov
(80) |
Dec
(18) |
2005 |
Jan
(54) |
Feb
(9) |
Mar
(35) |
Apr
(2) |
May
(20) |
Jun
(3) |
Jul
(45) |
Aug
(202) |
Sep
(2) |
Oct
(26) |
Nov
|
Dec
(4) |
2006 |
Jan
|
Feb
(7) |
Mar
(8) |
Apr
(66) |
May
(9) |
Jun
(40) |
Jul
(4) |
Aug
(4) |
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
2007 |
Jan
(2) |
Feb
(14) |
Mar
(4) |
Apr
(1) |
May
(5) |
Jun
(5) |
Jul
|
Aug
(8) |
Sep
(3) |
Oct
(7) |
Nov
|
Dec
|
2008 |
Jan
(6) |
Feb
|
Mar
(1) |
Apr
(8) |
May
(46) |
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(9) |
Oct
(3) |
Nov
|
Dec
(5) |
2009 |
Jan
(9) |
Feb
(2) |
Mar
(3) |
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(11) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(10) |
Aug
(5) |
Sep
(1) |
Oct
(13) |
Nov
|
Dec
(4) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
From: <gne...@us...> - 2009-02-01 17:45:41
|
Update of /cvsroot/aolserver/aolserver In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23321 Modified Files: ChangeLog Log Message: bump version number to 4.5.1 Index: ChangeLog =================================================================== RCS file: /cvsroot/aolserver/aolserver/ChangeLog,v retrieving revision 1.388 retrieving revision 1.389 diff -C2 -d -r1.388 -r1.389 *** ChangeLog 31 Jan 2009 21:38:50 -0000 1.388 --- ChangeLog 1 Feb 2009 17:45:34 -0000 1.389 *************** *** 1,3 **** ! 2009-01-29 Gustaf Neumann ne...@wu... * nsd/pools.c: Fixed error message for 'ns_pools set' command --- 1,14 ---- ! 2009-02-01 Gustaf Neumann <ne...@wu...> ! ! *** AOLserver 4.5.1 RELEASED *** ! ! 2009-02-01 Gustaf Neumann <ne...@wu...> ! ! * nsd/pools.c: ! ! 2009-02-01 tag aolserver_v45_r1 ! ! ! 2009-01-29 Gustaf Neumann <ne...@wu...> * nsd/pools.c: Fixed error message for 'ns_pools set' command |
From: <gne...@us...> - 2009-01-31 22:16:51
|
Update of /cvsroot/aolserver/aolserver In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16870 Modified Files: ChangeLog Log Message: updated changelog Index: ChangeLog =================================================================== RCS file: /cvsroot/aolserver/aolserver/ChangeLog,v retrieving revision 1.387 retrieving revision 1.388 diff -C2 -d -r1.387 -r1.388 *** ChangeLog 29 Jan 2009 12:52:58 -0000 1.387 --- ChangeLog 31 Jan 2009 21:38:50 -0000 1.388 *************** *** 1,8 **** 2009-01-29 Gustaf Neumann ne...@wu... * nsssl/ssltcl.c: Remove direct access to interp->result ! * Changelog: ! completed changelog, mark missing documentations 2009-01-19 Gustaf Neumann ne...@wu... --- 1,25 ---- 2009-01-29 Gustaf Neumann ne...@wu... + * nsd/pools.c: + Fixed error message for 'ns_pools set' command + + * nsd/tclcache.c: Fixed behavior such that 'return' in + 'ns_cache eval' works like described in the documentation + and in the old nscache module. Example: + + ns_cache eval mycache mykey { return [expr {1+1}] } + + Before, 'return' raised a tcl error. + + * doc/ns_cache.n: added documentation of optional 'pattern' + argument for 'ns_cache names'. + + * Updated Changelog. + + 2009-01-29 Gustaf Neumann ne...@wu... * nsssl/ssltcl.c: Remove direct access to interp->result ! * Changelog: Completed Changelog entries from commits after ! the 4.5.0 release. 2009-01-19 Gustaf Neumann ne...@wu... *************** *** 45,50 **** every connection thread). - ?DOC? - 2008-12-05 Gustaf Neumann ne...@wu... --- 62,65 ---- *************** *** 130,135 **** Untabified source, no code changes. - ?DOC? - 2007-10-26 Gustaf Neumann ne...@wu... --- 145,148 ---- *************** *** 222,226 **** * tcl/charsets.tcl: fix unbraced expressions and old style comparisons - ?DOC? 2007-08-24 Michael Andrews mic...@us... --- 235,238 ---- *************** *** 249,254 **** This allows you to specify packages to load at start up. - ?DOC? - 2007-08-01 Michael Andrews mic...@us... --- 261,264 ---- *************** *** 274,278 **** Changed maxconns to maxconnections to be backward compatible - ?DOC? 2007-06-13 Michael Andrews mic...@us... --- 284,287 ---- *************** *** 289,293 **** <pool>-proxy-<number> - ?DOC? 2007-05-08 Michael Andrews mic...@us... --- 298,301 ---- *************** *** 488,492 **** * configure: * configure.in: Removed check for zlib now loadable by ! nszlib module. * doc/Ns_Conn.3: --- 496,500 ---- * configure: * configure.in: Removed check for zlib now loadable by ! nszlib module. * doc/Ns_Conn.3: *************** *** 518,536 **** * nsd/compress.c: Changed from Ns_Compress to Ns_Gzip and ! moved code to new nszlib module. * nsd/connio.c: Updated to call Ns_Gzip, added Ns_ConnFlushDirect, ! and fixed bug reading final line in Ns_ConnReadLine. * nsd/fastpath.c: Fixed bug with mapped content. * nsd/modload.c: Removed legacy pre-10.4 OS/X module loading ! code as dlopen, etc. is now supported. * nsd/pathname.c: Added Ns_BinPath. * nsd/return.c: Now uses Ns_ConnFlushDirect in ReturnData ! and changed Ns_ConnReturnHtml to call Ns_ConnReturnCharData ! to ensure text is encoded as needed. * nproxy/Makefile (new file): --- 526,544 ---- * nsd/compress.c: Changed from Ns_Compress to Ns_Gzip and ! moved code to new nszlib module. * nsd/connio.c: Updated to call Ns_Gzip, added Ns_ConnFlushDirect, ! and fixed bug reading final line in Ns_ConnReadLine. * nsd/fastpath.c: Fixed bug with mapped content. * nsd/modload.c: Removed legacy pre-10.4 OS/X module loading ! code as dlopen, etc. is now supported. * nsd/pathname.c: Added Ns_BinPath. * nsd/return.c: Now uses Ns_ConnFlushDirect in ReturnData ! and changed Ns_ConnReturnHtml to call Ns_ConnReturnCharData ! to ensure text is encoded as needed. * nproxy/Makefile (new file): *************** *** 539,543 **** * nsproxy/nsproxylib.c (new file): * nsproxy/nsproxymod.c (new file): New AOLserver/Tcl ! pipe-based proxy support. * nszlib/ChangeLog (new file): --- 547,551 ---- * nsproxy/nsproxylib.c (new file): * nsproxy/nsproxymod.c (new file): New AOLserver/Tcl ! pipe-based proxy support. * nszlib/ChangeLog (new file): *************** *** 548,554 **** * nszlib/nszlib.c (new file): * nszlib/nszlib.h (new file): New zlib extension for ! AOLserver 4.5. Provides both the "ns_zlib" command and ! enables the Ns_Gzip routine. Based on work by Vlad Seryakov ! <vl...@cr...>. --- 556,562 ---- * nszlib/nszlib.c (new file): * nszlib/nszlib.h (new file): New zlib extension for ! AOLserver 4.5. Provides both the "ns_zlib" command and ! enables the Ns_Gzip routine. Based on work by Vlad Seryakov ! <vl...@cr...>. |
From: <gne...@us...> - 2009-01-31 22:16:45
|
Update of /cvsroot/aolserver/aolserver/nsd In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16532/nsd Modified Files: tclcache.c Log Message: - Fixed behavior such that 'return' in 'ns_cache eval' works like described in the documentation and in the old nscache module. - Added documentation of optional 'pattern' argument for 'ns_cache names'. Index: tclcache.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/tclcache.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tclcache.c 1 Aug 2005 20:29:24 -0000 1.2 --- tclcache.c 31 Jan 2009 21:35:08 -0000 1.3 *************** *** 392,395 **** --- 392,396 ---- return TCL_ERROR; } + status = TCL_OK; key = Tcl_GetString(objv[3]); Ns_CacheLock(cachePtr->cache); *************** *** 439,449 **** Ns_CacheLock(cachePtr->cache); entry = Ns_CacheCreateEntry(cachePtr->cache, key, &new); ! if (status != TCL_OK) { ! Ns_CacheFlushEntry(entry); ! err = 1; ! } else { objPtr = Tcl_GetObjResult(interp); valPtr = NewVal(cachePtr, objPtr, &now); Ns_CacheSetValueSz(entry, valPtr, valPtr->length); } Ns_CacheBroadcast(cachePtr->cache); --- 440,454 ---- Ns_CacheLock(cachePtr->cache); entry = Ns_CacheCreateEntry(cachePtr->cache, key, &new); ! ! if (status == TCL_OK || status == TCL_RETURN) { objPtr = Tcl_GetObjResult(interp); valPtr = NewVal(cachePtr, objPtr, &now); Ns_CacheSetValueSz(entry, valPtr, valPtr->length); + + if (status == TCL_RETURN) { + status = TCL_OK; + } + } else { + Ns_CacheFlushEntry(entry); } Ns_CacheBroadcast(cachePtr->cache); *************** *** 454,457 **** --- 459,464 ---- return TCL_ERROR; } + + return status; break; } |
From: <gne...@us...> - 2009-01-31 22:16:39
|
Update of /cvsroot/aolserver/aolserver/doc In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16532/doc Modified Files: ns_cache.n Log Message: - Fixed behavior such that 'return' in 'ns_cache eval' works like described in the documentation and in the old nscache module. - Added documentation of optional 'pattern' argument for 'ns_cache names'. Index: ns_cache.n =================================================================== RCS file: /cvsroot/aolserver/aolserver/doc/ns_cache.n,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ns_cache.n 13 Apr 2006 19:05:43 -0000 1.5 --- ns_cache.n 31 Jan 2009 21:35:08 -0000 1.6 *************** *** 50,54 **** \fBns_cache incr \fIcachename key ?value?\fR \fBns_cache lappend \fIcachename key string ?string ...?\fR ! \fBns_cache names \fIcachename\fR \fBns_cache set \fIcachename key string\fR .fi --- 50,54 ---- \fBns_cache incr \fIcachename key ?value?\fR \fBns_cache lappend \fIcachename key string ?string ...?\fR ! \fBns_cache names \fIcachename ?pattern?\fR \fBns_cache set \fIcachename key string\fR .fi *************** *** 119,124 **** value and returns 1, otherwise it returns 0. .TP ! \fBns_cache names \fIcachename\fR This command returns a list of all keys currently in the specified cache. If the cache is thread-private, then the list only includes keys that --- 119,126 ---- value and returns 1, otherwise it returns 0. .TP ! \fBns_cache names \fIcachename ?pattern?\fR This command returns a list of all keys currently in the specified cache. + If \fIpattern\fR is specified, only matching entries are returned + (match pattern syntax like in \fBstring match\fR). If the cache is thread-private, then the list only includes keys that |
From: <gne...@us...> - 2009-01-31 21:23:56
|
Update of /cvsroot/aolserver/aolserver/nsd In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16199/nsd Modified Files: pools.c Log Message: fixed error message for 'ns_pools set' command. Index: pools.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/pools.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pools.c 27 Dec 2008 00:36:38 -0000 1.14 --- pools.c 31 Jan 2009 21:23:47 -0000 1.15 *************** *** 154,158 **** case PSetIdx: if (objc < 3 || (((objc - 3) % 2) != 0)) { ! Tcl_WrongNumArgs(interp, 2, objv, "limit ?opt val opt val...?"); return TCL_ERROR; } --- 154,158 ---- case PSetIdx: if (objc < 3 || (((objc - 3) % 2) != 0)) { ! Tcl_WrongNumArgs(interp, 2, objv, "pool ?opt val opt val...?"); return TCL_ERROR; } |
From: <gne...@us...> - 2009-01-30 10:53:11
|
Update of /cvsroot/aolserver/aolserver.com/docs/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22736 Modified Files: config-reference.tcl.txt Log Message: update annotated config file Index: config-reference.tcl.txt =================================================================== RCS file: /cvsroot/aolserver/aolserver.com/docs/admin/config-reference.tcl.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config-reference.tcl.txt 20 Mar 2002 22:10:33 -0000 1.4 --- config-reference.tcl.txt 30 Jan 2009 10:53:02 -0000 1.5 *************** *** 93,101 **** ns_param connsperthread 0 ;# Normally there's one conn per thread ns_param flushcontent false ;# Flush all data before returning - ns_param maxconnections 100 ;# Max connections to put on queue ns_param maxdropped 0 ;# Shut down if dropping too many conns ns_param maxthreads 20 ;# Tune this to scale your server ns_param minthreads 0 ;# Tune this to scale your server ns_param threadtimeout 120 ;# Idle threads die at this rate # Limits --- 93,103 ---- ns_param connsperthread 0 ;# Normally there's one conn per thread ns_param flushcontent false ;# Flush all data before returning ns_param maxdropped 0 ;# Shut down if dropping too many conns ns_param maxthreads 20 ;# Tune this to scale your server ns_param minthreads 0 ;# Tune this to scale your server ns_param threadtimeout 120 ;# Idle threads die at this rate + ns_param maxconnections 100 ;# Max connections per thread before it is shut down + ns_param spread 20 ;# Variance factor for threadtimeout and maxconnections + ;# to prevent mass mortality of theads (e.g. +-20%) # Limits |
From: <as...@us...> - 2009-01-29 20:54:31
|
Update of /cvsroot/aolserver/aolserver/nsd In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31198 Modified Files: driver.c Log Message: Avoid dereferencing NULL conn ptr in the driver query logic. Index: driver.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/driver.c,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** driver.c 19 Oct 2007 09:46:38 -0000 1.57 --- driver.c 29 Jan 2009 20:54:24 -0000 1.58 *************** *** 1329,1333 **** sockPtr->acceptTime.sec, sockPtr->acceptTime.usec, sockPtr->timeout.sec, sockPtr->timeout.usec); ! NsAppendConn(drvPtr->queryPtr, sockPtr->connPtr, "i/o"); Tcl_DStringEndSublist(drvPtr->queryPtr); sockPtr = sockPtr->nextPtr; --- 1329,1338 ---- sockPtr->acceptTime.sec, sockPtr->acceptTime.usec, sockPtr->timeout.sec, sockPtr->timeout.usec); ! if (sockPtr->connPtr != NULL) { ! NsAppendConn(drvPtr->queryPtr, sockPtr->connPtr, "i/o"); ! } else { ! Tcl_DStringStartSublist(drvPtr->queryPtr); ! Tcl_DStringEndSublist(drvPtr->queryPtr); ! } Tcl_DStringEndSublist(drvPtr->queryPtr); sockPtr = sockPtr->nextPtr; |
From: <gne...@us...> - 2009-01-29 12:53:13
|
Update of /cvsroot/aolserver/aolserver In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31797 Modified Files: ChangeLog Log Message: - completed changelog - mark missing documentations Index: ChangeLog =================================================================== RCS file: /cvsroot/aolserver/aolserver/ChangeLog,v retrieving revision 1.386 retrieving revision 1.387 diff -C2 -d -r1.386 -r1.387 *** ChangeLog 20 Jun 2008 08:06:26 -0000 1.386 --- ChangeLog 29 Jan 2009 12:52:58 -0000 1.387 *************** *** 1,62 **** ! 2008-06-20 Gustaf Neumann <ne...@wu...> ! * remove direct access to interp->result in ! - nscp/nscp.c ! - nsd/tclloop.c ! - nsd/tclshare.c ! - nsproxy/nsproxylib.c ! * initializing potentially uninitialized variables in ! - nsproxy/nsproxylib.c ! 2008-05-13 Jeff Rogers <dv...@di...> ! * configure.in: add -nostartfiles flag to link line when -shared ! is already there. Without this, build fails against tcl8.5 ! * configure: regenerated ! 2007-05-11 Nathan Folkman <nat...@gm...> ! * nsproxy/nsproxylib.c: Fixed crash bug that occurred when trying ! to create more then one proxy pool. The proxy id now takes the ! form of: ! <pool>-proxy-<number> ! 2007-03-12 Nathan Folkman <nat...@gm...> ! * nsd/tclhttp.c: Added preliminary support to allow sending and ! retrieving binary data correctly. ! 2006-12-15 Dossy Shiobara <do...@pa...> ! * nsd/driver.c (1.56): [BUG #1615787] Fix deadlock bug when driver ! thread stalls under specific conditions. Thanks to Jeff Rogers ! and Gustaf Neumann. ! 2006-08-07 Dossy Shiobara <do...@pa...> ! * include/nsattributes.h (1.4): Provide default no-op defines for ! gcc attributes correctly to enable builds on older gcc to work. ! Previously, "may_alias" attribute resulted in gcc older than 3.3 ! to no longer build. This minor change fixes this. ! 2006-07-07 Jim Davidson <jgd...@oo...> * include/ns.h: ! * nsd/return.c: Added Ns_RegisterRedirect as a replacement ! to Ns_RegisterReturn which did not require a virtual server ! argument as expected. * nsd/server.c: Updated to call new Ns_RegisterRedirect, ! fixing bug #1518426 * doc/Ns_ConnReturnStatus.3: Updated to document the new ! Ns_RegisterRedirect, removing reference to Ns_RegisterReturn. ! ! 2006-06-28 Nathan Folkman <nat...@gm...> ! * nsd/adpeval.c: Fixed crash bug in NsAdpLogError() when ! a NULL adp->framePtr is encountered. --- 1,364 ---- ! 2009-01-29 Gustaf Neumann ne...@wu... ! * nsssl/ssltcl.c: ! Remove direct access to interp->result ! * Changelog: ! completed changelog, mark missing documentations ! 2009-01-19 Gustaf Neumann ne...@wu... ! * tcl/fastpath.tcl, ! * tcl/file.tcl: ! * tcl/form.tcl: ! * tcl/http.tcl: ! * tcl/nsdb.tcl: ! * tcl/packages.tcl: ! * tcl/sendmail.tcl: Use Tcl 8.4 non-numeric comparison ! operators where appropriate ! 2008-12-27 Gustaf Neumann ne...@wu... ! * nsd/nsd.h: ! * nsd/pools.c: ! * nsd/queue.c: ! * tcl/pools.tcl: ! New configure parameter "spread" for ns_pools: ! ! Background: Requests are distributed to idle threads via ! CondSignal, which delivers subsequent signals to idle ! threads in a circular manner (i.e. t1, t2, .. tn, then t1 ! again) determined by the scheduling policy of the operating ! system. This round robin behavior has the disadvantage that ! multiple threads terminate about at the same time, based on ! the maxconnections (or maxconns) value. The idle timeout ! will never be used on a sufficiently busy server. ! The mass termination of threads is performance-wise bad, ! especially when many connections threads are configured, ! since it is likely that about the same amount of threads ! will be recreated. The "spread" parameter introduces a ! random factor into threadtimeout and maxconnections to avoid ! these termination cycles. It adds +/- the specified ! percentage to maxconnections and threadtimeout (e.g. a ! spread of 20 means a random value between 0.80 to 1.20 of ! the specified value of maxconnections and threadtimeout for ! every connection thread). ! ?DOC? ! 2008-12-05 Gustaf Neumann ne...@wu... ! * include/ns.h: ! * nsd/limits.c: ! * nsd/pools.c: ! * nsd/server.c: ! * nsext/nsext.c: ! - Provide names for all Ns_Mutex to report meaningful output ! in aolserver statistics ! - Set version number to 4.5.0p1 to differentiate from 4.5.0 ! unpatched release ! 2008-10-12 Gustaf Neumann ne...@wu... ! * tcl/stats.tcl: Fixed Tcl expressions such they can be ! compiled into Tcl byte code ! 2008-09-24 Gustaf Neumann ne...@wu... ! * nsd/queue.c: Fixed boundary condition for starting threads ! (there was a problem at least with keepwait > 0 and ! minthreads = 0) ! ! 2008-06-20 Gustaf Neumann ne...@wu... ! ! * nscp/nscp.c: ! * nsd/tclloop.c: ! * nsd/tclshare.c: ! * nsproxy/nsproxylib.c: ! Remove direct access to interp->result ! ! * Initializing potentially uninitialized variables ! in nsproxy/nsproxylib.c: ! ! 2008-05-13 Jeff Rogers <dv...@di...> ! ! * configure.in: Add -nostartfiles flag to link line when -shared ! is already there. Without this, build fails against tcl8.5 ! * configure: Regenerated ! ! 2008-05-10 Daniel P. Stasinski moo...@us... ! ! * nsperm/nsperm.c: ! Fixed bug with netmask parsing ! ! 2008-05-06 Gustaf Neumann ne...@wu... ! ! * nsd/tclfile.c: ! Adding missing variable declaration ! ! 2008-04-24 Gustaf Neumann ne...@wu... ! ! * nsd/tclfile.c: ! Fix ns_tmpnam for WIN32 environments to return a path in the ! TMP directory. ! ! 2008-03-22 Gustaf Neumann ne...@wu... ! ! * nsd/fd.c: Fix for Mac OS X Leopard: setrlimit with ! RLIM_INFINITY fails and causes Ns_Log to crash (fix was ! sketched by David Caruso on the aolserver mailing list on ! Jan 10, 2008) ! ! 2008-01-24 Dossy Shiobara <do...@pa...> ! ! * nscgi/nscgi.c: Added Tcl command "ns_register_cgi" which ! effectively does the same as "ns_param map" at startup, as ! it takes the same argument, the map string. Also, ! REQUEST_URI is now properly set in the env. for CGI ! executables. ! ! * nscgi/nscgi.c: Backported nscgi.c rev 1.33 change to ! aolserver_v40_bp branch. ! ! * nscgi/nscgi.c: Backported nscgi.c rev 1.34 change to ! aolserver_v40_bp branch. ! ! * nscgi/nscgi.c: Oops, REQUEST_URI should have only been the ! Request-URI, not including the query string. ! ! * nscgi/nscgi.c: ! Untabified source, no code changes. ! ! ?DOC? ! ! 2007-10-26 Gustaf Neumann ne...@wu... ! ! * nsd/nsd.h: ! * nsd/pools.c: ! * nsd/queue.c: Keep track of connection thread state. Two new ! variables are introduced: ! ! - starting: keeps the number of currently ! starting threads ! - waiting: the number of threads in the cond waiting state ! ! These variables help to get a more precise understanding and ! allow for better knowledge for thread creation (especially ! under heavy load) ! ! 2007-10-22 Gustaf Neumann ne...@wu... ! ! * nsd/queue.c: Remove old code for allowing to run more than ! maxconns requests in one thread (replaced by thread ! creation); Maintain min-threads threads when threads are ! exiting. ! ! 2007-10-21 Gustaf Neumann ne...@wu... ! ! * nsd/queue.c: ! Protect poolptr condition by mutex ! ! 2007-10-20 Gustaf Neumann ne...@wu... ! ! * nsd/nsd.h: ! * nsd/pools.c: ! * nsd/queue.c: ! Continuing work on BUG #1615787; instead of performing in ! boundary situations in the worst case more than the ! configured maxconns requests, a new connection thread is ! created automatically after the exit of a thread coming to ! the end of it work cycle, when jobs are pending and no other ! thread is able to process these. ! ! * tcl/util.tcl: ! using Tcl 8.4 string comparison operators ! ! 2007-10-19 Tom Jackson rm...@us... ! ! * nsd/queue.c: Previous versions of AOLserver included the ! threadpool name in the name of the thread. This commit ! simply adds back that making it easier to figure out what ! threadpool was used for a request. ! ! 2007-10-19 Gustaf Neumann ne...@wu... ! ! * nsd/driver.c: ! * nsd/queue.c: ! ! Better fix for BUG #1615787 in aolserver 4.5. Although the ! original fix apparently helped for www.openacs.org, it ! appears to simply change the timing, but did not fix the ! problem itself. The problem was that under limited resource ! configurations (e.g. maxthreads 5, maxconnections 3) and ! heavy traffic, incoming requests were queued but not ! processed in new connection threads. The situation was ! especially bad, when the number of queued requests was ! larger than maxconnections, since after processing n ! requests the server was idling with a high number of queued ! requests. New requests were put to the end of the queue ! while old (maybe already timed-out) requests are being ! served. The server appeared to hang. The current fix cares ! for queued requests even when maxconns is exceeded. A maybe ! better approach is to limit the number of queued requests or ! to restart automatically threads when a thread exists due to ! maxconns exceeded. ! ! 2007-09-29 Gustaf Neumann ne...@wu... ! ! * nsd/conn.c: ! Extend ns_conn by two commands: ! ! - ns_conn channel: Return a Tcl channel from the current ! connection. This channel can be used to talk via Tcl I/O ! to the remote client afterwards. "ns_conn channel" was ! originally written by Zoran. ! ! - ns_conn contentsentlength ?number?: Query or set the ! number of octets sent to the client. This command can be ! used in connection with "ns_conn channel" to adjust the ! length entry in a log file in cases, the file was sent via ! Tcl I/O. ! ! * tcl/charsets.tcl: ! fix unbraced expressions and old style comparisons ! ?DOC? ! ! 2007-08-24 Michael Andrews mic...@us... ! ! * tcl/packages.tcl: ! Modified log message to better conform to AOLserver standards. ! ! 2007-08-17 Michael Andrews mic...@us... ! ! * tcl/packages.tcl: ! I changed the way this file works. It now reads the ! following from the server config: ! ! ns_section "ns/server/${serverName}/packages" ! ns_param library /some/path/here ! ns_param library /some/path/here ! ns_param library /some/path/here ! ns_param library /some/path/here ! ns_param require packageNameHere ! ns_param require packageNameHere ! ns_param require packageNameHere ! ! All "library" values are added to the ::auto_path All ! "require" values are executed by "ns_ictl package require" The ! "nsinit" and "nspostinit" procs are then run for each package. ! This allows you to specify packages to load at start up. ! ! ?DOC? ! ! 2007-08-01 Michael Andrews mic...@us... ! ! * tcl/packages.tcl: ! - Added License info ! - changed init commands to all lower case. ! ! * tcl/pools.tcl: ! Added pools.tcl file to set default pool params from server ! config. ! ! * tcl/pools.tcl: ! Changed caps in debug notice. ! ! * tcl/pools.tcl: ! Changed debug to notice ! ! * tcl/pools.tcl: ! Changed maxconns to maxconnections as it was in old ! AOLserver. ! ! * examples/config/base.tcl: ! Changed maxconns to maxconnections to be backward compatible ! ! ?DOC? ! ! 2007-06-13 Michael Andrews mic...@us... ! ! * examples/config/base.tcl: ! Added nscp to the base.tcl (We need to redo the filesystem ! layout and configs for the out of the box install). ! ! 2007-05-11 Nathan Folkman <nat...@gm...> ! ! * nsproxy/nsproxylib.c: Fixed crash bug that occurred when ! trying to create more then one proxy pool. The proxy id now ! takes the form of: ! ! <pool>-proxy-<number> ! ?DOC? ! ! 2007-05-08 Michael Andrews mic...@us... ! ! * tcl/init.tcl: ! No longer adds $AOLSERVER/lib to the auto_path if it already ! exists. ! ! * tcl/packages.tcl: ! Optimized the code. ! ! * tcl/packages.tcl: ! removed hard return used for testing. ! ! 2007-05-07 Michael Andrews mic...@us... ! ! * tcl/packages.tcl: ! Added packages.tcl: ! 1) Reads config to set lib paths. ! 2) Reads config to load packages using ns_ictl. ! 3) Runs nsInit procs. ! 4) Runs nsPostInit procs. ! ! 2007-03-12 Nathan Folkman <nat...@gm...> ! ! * nsd/tclhttp.c: Preliminary support added for getting and ! retrieving binary data. ! ! 2007-01-22 Tom Jackson rm...@us... ! ! * nsd/tclresp.c: ! Bug where Tcl_SetBooleanObj accesses shared object, fixed ! with copy of obj ! ! 2006-12-15 Dossy Shiobara <do...@pa...> ! ! * nsd/driver.c: [BUG #1615787] Fix deadlock bug when driver ! thread stalls under specific conditions. Thanks to Jeff ! Rogers and Gustaf Neumann. ! ! 2006-08-17 Bas Scheffers bas...@us... ! ! * nsd/tclfile.c: Changed file permissions of mkdir to 777 so ! it works properly with the system's umask. ! ! 2006-08-08 Dossy Shiobara <do...@pa...> ! ! * include/nsattributes.h: Provide default no-op defines for ! gcc attributes correctly to enable builds on older gcc to ! work. Previously, "may_alias" attribute resulted in gcc ! older than 3.3 to no longer build. This minor change fixes ! this. ! ! 2006-07-07 Jim Davidson <jgd...@oo...> * include/ns.h: ! ! * nsd/return.c: Added Ns_RegisterRedirect as a replacement to ! Ns_RegisterReturn which did not require a virtual server ! argument as expected. * nsd/server.c: Updated to call new Ns_RegisterRedirect, ! fixing bug #1518426 * doc/Ns_ConnReturnStatus.3: Updated to document the new ! Ns_RegisterRedirect, removing reference to ! Ns_RegisterReturn. ! 2006-06-28 Nathan Folkman <nat...@gm...> ! * nsd/adpeval.c: Fixed crash bug in NsAdpLogError() when a ! NULL adp->framePtr is encountered. |
From: <gne...@us...> - 2009-01-29 12:49:54
|
Update of /cvsroot/aolserver/aolserver/nsssl In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31644/nsssl Modified Files: ssltcl.c Log Message: Remove direct access to interp->result Index: ssltcl.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsssl/ssltcl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ssltcl.c 23 Apr 2001 21:06:01 -0000 1.1 --- ssltcl.c 29 Jan 2009 12:49:45 -0000 1.2 *************** *** 654,663 **** } } - if (*p == '\0') { - interp->result = "1"; - } else { - interp->result = "0"; - } } else { Tcl_AppendResult(interp, "usage: \"", argv[0], --- 654,659 ---- } } + Tcl_SetResult(interp, *p == '\0' ? "1" : "0", TCL_STATIC); } else { Tcl_AppendResult(interp, "usage: \"", argv[0], |
Update of /cvsroot/aolserver/aolserver/tcl In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16234 Modified Files: fastpath.tcl file.tcl form.tcl http.tcl nsdb.tcl packages.tcl sendmail.tcl Log Message: Use Tcl 8.4 non-numeric comparison operators where appropriate Index: fastpath.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/fastpath.tcl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** fastpath.tcl 18 Aug 2004 03:43:20 -0000 1.10 --- fastpath.tcl 19 Jan 2009 12:21:08 -0000 1.11 *************** *** 392,396 **** } } ! if {$type == "application/x-naviwad"} { if {$exists} { if {!$ismw} { --- 392,396 ---- } } ! if {$type eq "application/x-naviwad"} { if {$exists} { if {!$ismw} { Index: file.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/file.tcl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** file.tcl 1 Nov 2003 16:42:26 -0000 1.4 --- file.tcl 19 Jan 2009 12:21:08 -0000 1.5 *************** *** 89,97 **** } ! if {$code == 1 && $errorCode == "NS_TCL_ABORT"} { return } ! if { $errorPage == "" } { return -code $code \ -errorcode $errorCode -errorinfo $errorInfo $result --- 89,97 ---- } ! if {$code == 1 && $errorCode eq "NS_TCL_ABORT"} { return } ! if { $errorPage eq "" } { return -code $code \ -errorcode $errorCode -errorinfo $errorInfo $result Index: form.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/form.tcl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** form.tcl 28 May 2003 18:19:14 -0000 1.9 --- form.tcl 19 Jan 2009 12:21:08 -0000 1.10 *************** *** 66,70 **** proc ns_queryget {key {value ""}} { set form [ns_getform] ! if { $form != "" } { set tmp [ns_set iget $form $key] if {[string length $tmp]} { --- 66,70 ---- proc ns_queryget {key {value ""}} { set form [ns_getform] ! if { $form ne "" } { set tmp [ns_set iget $form $key] if {[string length $tmp]} { *************** *** 84,88 **** proc ns_querygetall {key {def_result ""}} { set form [ns_getform] ! if {$form != ""} { set result "" set size [ns_set size $form] --- 84,88 ---- proc ns_querygetall {key {def_result ""}} { set form [ns_getform] ! if {$form ne ""} { set result "" set size [ns_set size $form] *************** *** 99,103 **** } } ! if {[string length $result] == 0} { set result $def_result } --- 99,103 ---- } } ! if {$result eq ""} { set result $def_result } *************** *** 118,122 **** set form [ns_getform] set i -1 ! if { $form != "" } { set i [ns_set ifind $form $key] } --- 118,122 ---- set form [ns_getform] set i -1 ! if { $form ne "" } { set i [ns_set ifind $form $key] } *************** *** 139,143 **** # alter the current conn's urlcharset. # This can cause cached formsets to get flushed. ! if {$charset != ""} { ns_urlcharset $charset } --- 139,143 ---- # alter the current conn's urlcharset. # This can cause cached formsets to get flushed. ! if {$charset ne ""} { ns_urlcharset $charset } *************** *** 151,155 **** set type [ns_set get $hdr content-type] set fp "" ! while {$fp == ""} { set tmpfile [ns_tmpnam] set fp [ns_openexcl $tmpfile] --- 151,155 ---- set type [ns_set get $hdr content-type] set fp "" ! while {$fp eq ""} { set tmpfile [ns_tmpnam] set fp [ns_openexcl $tmpfile] *************** *** 195,199 **** if {[catch { set fp [open $file {RDWR CREAT EXCL} ] } err]} { global errorCode ! if { [lindex $errorCode 1] != "EEXIST"} { return -code error $err } --- 195,199 ---- if {[catch { set fp [open $file {RDWR CREAT EXCL} ] } err]} { global errorCode ! if { [lindex $errorCode 1] ne "EEXIST"} { return -code error $err } *************** *** 217,221 **** unset _ns_form } ! if {[string compare $newform ""] != 0} { set _ns_form $newform } --- 217,221 ---- unset _ns_form } ! if {$newform ne "" } { set _ns_form $newform } Index: http.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/http.tcl,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** http.tcl 24 Jul 2005 04:25:27 -0000 1.14 --- http.tcl 19 Jan 2009 12:21:08 -0000 1.15 *************** *** 71,75 **** # ! if {![string match http://* $url]} { return -code error "Invalid url \"$url\": "\ "ns_httpopen only supports HTTP" --- 71,75 ---- # ! if {![string match "http://*" $url]} { return -code error "Invalid url \"$url\": "\ "ns_httpopen only supports HTTP" *************** *** 84,88 **** set host [lindex $hp 0] set port [lindex $hp 1] ! if {[string match $port ""]} { set port 80 } --- 84,88 ---- set host [lindex $hp 0] set port [lindex $hp 1] ! if {$port eq ""} { set port 80 } *************** *** 103,107 **** _ns_http_puts $timeout $wfd "$method $uri HTTP/1.0\r" ! if {$rqset != ""} { # # There are request headers --- 103,107 ---- _ns_http_puts $timeout $wfd "$method $uri HTTP/1.0\r" ! if {$rqset ne ""} { # # There are request headers *************** *** 141,145 **** # ! if {$pdata != ""} { _ns_http_puts $timeout $wfd "\r\n$pdata\r" } else { --- 141,145 ---- # ! if {$pdata ne ""} { _ns_http_puts $timeout $wfd "\r\n$pdata\r" } else { *************** *** 200,209 **** # ! if {[string match "" $rqset]} { set rqset [ns_set new rqset] ns_set put $rqset "Accept" "*/*\r" ns_set put $rqset "User-Agent" "[ns_info name]-Tcl/[ns_info version]\r" } ! if {$type == ""} { ns_set put $rqset "Content-type" "application/x-www-form-urlencoded" } else { --- 200,209 ---- # ! if {$rqset eq ""} { set rqset [ns_set new rqset] ns_set put $rqset "Accept" "*/*\r" ns_set put $rqset "User-Agent" "[ns_info name]-Tcl/[ns_info version]\r" } ! if {$type eq ""} { ns_set put $rqset "Content-type" "application/x-www-form-urlencoded" } else { *************** *** 216,220 **** set querystring "" ! if {![string match "" $qsset]} { for {set i 0} {$i < [ns_set size $qsset]} {incr i} { set key [ns_set key $qsset $i] --- 216,220 ---- set querystring "" ! if {$qsset ne ""} { for {set i 0} {$i < [ns_set size $qsset]} {incr i} { set key [ns_set key $qsset $i] *************** *** 242,246 **** set length [ns_set iget $headers content-length] ! if {[string match "" $length]} { set length -1 } --- 242,246 ---- set length [ns_set iget $headers content-length] ! if {$length eq ""} { set length -1 } *************** *** 253,257 **** set buf [_ns_http_read $timeout $rfd $length] append page $buf ! if {[string match "" $buf]} { break } --- 253,257 ---- set buf [_ns_http_read $timeout $rfd $length] append page $buf ! if {$buf eq ""} { break } *************** *** 308,312 **** # set location [ns_set iget $headers location] ! if {$location != ""} { ns_set free $headers close $rfd --- 308,312 ---- # set location [ns_set iget $headers location] ! if {$location ne ""} { ns_set free $headers close $rfd *************** *** 316,320 **** set host [lindex $hp 0] set port [lindex $hp 1] ! if {[string match $port ""]} { set port 80 } --- 316,320 ---- set host [lindex $hp 0] set port [lindex $hp 1] ! if {$port eq ""} { set port 80 } *************** *** 328,332 **** set length [ns_set iget $headers content-length] ! if {[string match "" $length]} { set length -1 } --- 328,332 ---- set length [ns_set iget $headers content-length] ! if {$length eq ""} { set length -1 } *************** *** 339,343 **** set buf [_ns_http_read $timeout $rfd $length] append page $buf ! if {[string match "" $buf]} { break } --- 339,343 ---- set buf [_ns_http_read $timeout $rfd $length] append page $buf ! if {$buf eq ""} { break } *************** *** 379,383 **** if {!$nread} { set sel [ns_sockselect -timeout $timeout $sock {} {}] ! if {[string match "" [lindex $sel 0]]} { return -code error "ns_sockreadwait: Timeout waiting for remote" } --- 379,383 ---- if {!$nread} { set sel [ns_sockselect -timeout $timeout $sock {} {}] ! if {"" eq [lindex $sel 0]} { return -code error "ns_sockreadwait: Timeout waiting for remote" } *************** *** 427,431 **** while {!$done && $nline > 0} { set char [read $sock 1] ! if {$char == "\n"} {set done 1} append line $char incr nline -1 --- 427,431 ---- while {!$done && $nline > 0} { set char [read $sock 1] ! if {$char eq "\n"} {set done 1} append line $char incr nline -1 Index: nsdb.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/nsdb.tcl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** nsdb.tcl 8 Feb 2002 07:56:16 -0000 1.4 --- nsdb.tcl 19 Jan 2009 12:21:08 -0000 1.5 *************** *** 68,85 **** proc ns_dbquotevalue {value {type text}} { ! if {[string match "" $value]} { return "NULL" } ! if {$type == "decimal" \ ! || $type == "double" \ ! || $type == "integer" \ ! || $type == "int" \ ! || $type == "real" \ ! || $type == "smallint" \ ! || $type == "bigint" \ ! || $type == "bit" \ ! || $type == "float" \ ! || $type == "numeric" \ ! || $type == "tinyint"} { return $value } --- 68,85 ---- proc ns_dbquotevalue {value {type text}} { ! if {$value eq ""} { return "NULL" } ! if {$type eq "decimal" \ ! || $type eq "double" \ ! || $type eq "integer" \ ! || $type eq "int" \ ! || $type eq "real" \ ! || $type eq "smallint" \ ! || $type eq "bigint" \ ! || $type eq "bit" \ ! || $type eq "float" \ ! || $type eq "numeric" \ ! || $type eq "tinyint"} { return $value } *************** *** 187,195 **** proc ns_buildsqltime {time ampm} { ! if {[string match "" $time] && [string match "" $ampm]} { return "" } ! if {[string match "" $time] || [string match "" $ampm]} { error "Invalid time: $time $ampm" } --- 187,195 ---- proc ns_buildsqltime {time ampm} { ! if {"" eq $time && "" eq $ampm} { return "" } ! if {"" eq $time || "" eq $ampm} { error "Invalid time: $time $ampm" } *************** *** 204,212 **** } ! if {$ampm == "AM"} { if {$hours == 12} { set hours 0 } ! } elseif {$ampm == "PM"} { if {$hours != 12} { incr hours 12 --- 204,212 ---- } ! if {$ampm eq "AM"} { if {$hours == 12} { set hours 0 } ! } elseif {$ampm eq "PM"} { if {$hours != 12} { incr hours 12 *************** *** 226,232 **** proc ns_buildsqldate {month day year} { ! if {[string match "" $month] \ ! && [string match "" $day] \ ! && [string match "" $year]} { return "" } --- 226,232 ---- proc ns_buildsqldate {month day year} { ! if {"" eq $month \ ! && "" eq $day \ ! && "" eq $year} { return "" } *************** *** 236,242 **** } ! if {[string match "" $month] \ ! || [string match "" $day] \ ! || [string match "" $year] \ || $month < 1 || $month > 12 \ || $day < 1 || $day > 31 \ --- 236,242 ---- } ! if {"" eq $month \ ! || "" eq $day \ ! || "" eq $year \ || $month < 1 || $month > 12 \ || $day < 1 || $day > 31 \ *************** *** 264,268 **** set time [ns_buildsqltime $time $ampm] ! if {[string match "" $date] || [string match "" $time]} { return "" } --- 264,268 ---- set time [ns_buildsqltime $time $ampm] ! if {"" eq $date || "" eq $time} { return "" } Index: packages.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/packages.tcl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** packages.tcl 18 Sep 2007 01:31:49 -0000 1.7 --- packages.tcl 19 Jan 2009 12:21:08 -0000 1.8 *************** *** 43,49 **** set value [ns_set value $nsSetId $x] ! if {[string eq "library" $key]} { lappend libraryList $value ! } elseif {[string eq "require" $key]} { lappend requireList $value } --- 43,49 ---- set value [ns_set value $nsSetId $x] ! if {"library" eq $key} { lappend libraryList $value ! } elseif {"require" eq $key} { lappend requireList $value } Index: sendmail.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/sendmail.tcl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sendmail.tcl 26 Jun 2006 00:28:42 -0000 1.7 --- sendmail.tcl 19 Jan 2009 12:21:08 -0000 1.8 *************** *** 57,61 **** error "Expected a $check status line; got:\n$line" } ! if {![string match "-" [string range $line 3 3]]} { break; } --- 57,61 ---- error "Expected a $check status line; got:\n$line" } ! if {[string range $line 3 3] ne "-"} { break; } *************** *** 82,97 **** ## Get smtp server into, if none then use localhost set smtp [ns_config ns/parameters smtphost] ! if {[string match "" $smtp]} { set smtp [ns_config ns/parameters mailhost] } ! if {[string match "" $smtp]} { set smtp localhost } set timeout [ns_config ns/parameters smtptimeout] ! if {[string match "" $timeout]} { set timeout 60 } set smtpport [ns_config ns/parameters smtpport] ! if {[string match "" $smtpport]} { set smtpport 25 } --- 82,97 ---- ## Get smtp server into, if none then use localhost set smtp [ns_config ns/parameters smtphost] ! if {$smtp eq ""} { set smtp [ns_config ns/parameters mailhost] } ! if {$smtp eq ""} { set smtp localhost } set timeout [ns_config ns/parameters smtptimeout] ! if {$timeout eq ""} { set timeout 60 } set smtpport [ns_config ns/parameters smtpport] ! if {$smtpport eq ""} { set smtpport 25 } *************** *** 103,107 **** set bcclist [list] ! if {![string match "" $bcclist_in]} { foreach bccaddr $bcclist_in { lappend bcclist "[string trim $bccaddr]" --- 103,107 ---- set bcclist [list] ! if {$bcclist_in ne ""} { foreach bccaddr $bcclist_in { lappend bcclist "[string trim $bccaddr]" *************** *** 130,134 **** ## Insert extra headers, if any (not for BCC) set message_id_already_done_p 0 ! if {![string match "" $extraheaders]} { set size [ns_set size $extraheaders] for {set i 0} {$i < $size} {incr i} { --- 130,134 ---- ## Insert extra headers, if any (not for BCC) set message_id_already_done_p 0 ! if {$extraheaders ne ""} { set size [ns_set size $extraheaders] for {set i 0} {$i < $size} {incr i} { *************** *** 188,192 **** ## Terminate body with a solitary period foreach line [split $msg "\n"] { ! if {[string match . $line]} { append data . } --- 188,192 ---- ## Terminate body with a solitary period foreach line [split $msg "\n"] { ! if {"." eq $line} { append data . } |
From: <gne...@us...> - 2008-12-27 00:36:46
|
Update of /cvsroot/aolserver/aolserver/nsd In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24700/nsd Modified Files: pools.c nsd.h queue.c Log Message: New configure parameter "spread" for ns_pools: Background: Requests are distributed to idle threads via CondSignal, which delivers subsequent signals to idle threads in a circular manner (i.e. t1, t2, .. tn, then t1 again) determined by the scheduling policy of the operating system. This round robin behavior has the disadvantage that multiple threads terminate about at the same time, based on the maxconnections (or maxconns) value. The idle timeout will never be used on a sufficiently busy server. The mass termination of threads is performance-wise bad, especially when many connections threads are configured, since it is likely that about the same amount of threads will be recreated. The "spread" parameter introduces a random factor into threadtimeout and maxconnections to avoid these termination cycles. It adds +/- the specified percentage to maxconnections and threadtimeout (e.g. a spread of 20 means a random value between 0.80 to 1.20 of the specified value of maxconnections and threadtimeout for every connection thread). Index: pools.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/pools.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pools.c 5 Dec 2008 08:51:43 -0000 1.13 --- pools.c 27 Dec 2008 00:36:38 -0000 1.14 *************** *** 120,127 **** } opt; static CONST char *cfgs[] = { ! "-maxthreads", "-minthreads", "-maxconns", "-timeout", NULL }; enum { ! PCMaxThreadsIdx, PCMinThreadsIdx, PCMaxConnsIdx, PCTimeoutIdx } cfg; --- 120,127 ---- } opt; static CONST char *cfgs[] = { ! "-maxthreads", "-minthreads", "-maxconns", "-timeout", "-spread", NULL }; enum { ! PCMaxThreadsIdx, PCMinThreadsIdx, PCMaxConnsIdx, PCTimeoutIdx, PCSpreadIdx } cfg; *************** *** 183,186 **** --- 183,190 ---- poolPtr->threads.maxconns = val; break; + + case PCSpreadIdx: + poolPtr->threads.spread = val; + break; } } *************** *** 198,201 **** --- 202,213 ---- return TCL_ERROR; } + if (poolPtr->threads.maxconns < 1) { + Tcl_SetResult(interp, "maxconns cannot be less than 1", TCL_STATIC); + return TCL_ERROR; + } + if (poolPtr->threads.spread < 0 || poolPtr->threads.spread > 100 ) { + Tcl_SetResult(interp, "spread must be between 0 and 100", TCL_STATIC); + return TCL_ERROR; + } if (PoolResult(interp, poolPtr) != TCL_OK) { return TCL_ERROR; *************** *** 391,394 **** --- 403,407 ---- poolPtr->threads.timeout = 120; /* NB: Exit after 2 minutes idle. */ poolPtr->threads.maxconns = 0; /* NB: Never exit thread. */ + poolPtr->threads.spread = 20; /* NB: +-20% random variance on timeout and maxconns. */ } return poolPtr; *************** *** 421,425 **** !AppendPool(interp, "maxconns", poolPtr->threads.maxconns) || !AppendPool(interp, "queued", poolPtr->threads.queued) || ! !AppendPool(interp, "timeout", poolPtr->threads.timeout)) { return TCL_ERROR; } --- 434,440 ---- !AppendPool(interp, "maxconns", poolPtr->threads.maxconns) || !AppendPool(interp, "queued", poolPtr->threads.queued) || ! !AppendPool(interp, "timeout", poolPtr->threads.timeout) || ! !AppendPool(interp, "spread", poolPtr->threads.spread) ! ) { return TCL_ERROR; } Index: nsd.h =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/nsd.h,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** nsd.h 26 Oct 2007 23:14:17 -0000 1.119 --- nsd.h 27 Dec 2008 00:36:38 -0000 1.120 *************** *** 569,572 **** --- 569,573 ---- int timeout; int maxconns; + int spread; unsigned int queued; } threads; Index: queue.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/queue.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** queue.c 24 Sep 2008 11:25:33 -0000 1.45 --- queue.c 27 Dec 2008 00:36:38 -0000 1.46 *************** *** 371,374 **** --- 371,375 ---- int status, ncons; char *msg; + double spread; /* *************** *** 381,385 **** Ns_MutexUnlock(&poolPtr->lock); Ns_ThreadSetName(name); ! ncons = poolPtr->threads.maxconns; msg = "exceeded max connections per thread"; --- 382,391 ---- Ns_MutexUnlock(&poolPtr->lock); Ns_ThreadSetName(name); ! ! /* spread is a value of 1.0 +- specified percentage, ! i.e. between 0.0 and 2.0 when the configured percentage is 100 */ ! spread = 1.0 + (2 * poolPtr->threads.spread * Ns_DRand() - poolPtr->threads.spread) / 100.0; ! ! ncons = round(poolPtr->threads.maxconns * spread); msg = "exceeded max connections per thread"; *************** *** 404,408 **** } else { Ns_GetTime(&wait); ! Ns_IncrTime(&wait, poolPtr->threads.timeout, 0); timePtr = &wait; } --- 410,414 ---- } else { Ns_GetTime(&wait); ! Ns_IncrTime(&wait, round(poolPtr->threads.timeout * spread), 0); timePtr = &wait; } |
From: <gne...@us...> - 2008-12-27 00:36:46
|
Update of /cvsroot/aolserver/aolserver/tcl In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24700/tcl Modified Files: pools.tcl Log Message: New configure parameter "spread" for ns_pools: Background: Requests are distributed to idle threads via CondSignal, which delivers subsequent signals to idle threads in a circular manner (i.e. t1, t2, .. tn, then t1 again) determined by the scheduling policy of the operating system. This round robin behavior has the disadvantage that multiple threads terminate about at the same time, based on the maxconnections (or maxconns) value. The idle timeout will never be used on a sufficiently busy server. The mass termination of threads is performance-wise bad, especially when many connections threads are configured, since it is likely that about the same amount of threads will be recreated. The "spread" parameter introduces a random factor into threadtimeout and maxconnections to avoid these termination cycles. It adds +/- the specified percentage to maxconnections and threadtimeout (e.g. a spread of 20 means a random value between 0.80 to 1.20 of the specified value of maxconnections and threadtimeout for every connection thread). Index: pools.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/pools.tcl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pools.tcl 1 Aug 2007 22:30:51 -0000 1.4 --- pools.tcl 27 Dec 2008 00:36:39 -0000 1.5 *************** *** 36,41 **** set maxconns [ns_config $cfgsection maxconnections 0] set timeout [ns_config $cfgsection threadtimeout 0] ! ns_pools set default -minthreads $minthreads -maxthreads $maxthreads -maxconns $maxconns -timeout $timeout ns_log notice "default thread pool: [ns_pools get default]" --- 36,42 ---- set maxconns [ns_config $cfgsection maxconnections 0] set timeout [ns_config $cfgsection threadtimeout 0] + set spread [ns_config $cfgsection spread 20] ! ns_pools set default -minthreads $minthreads -maxthreads $maxthreads -maxconns $maxconns -timeout $timeout -spread $spread ns_log notice "default thread pool: [ns_pools get default]" |
From: <gne...@us...> - 2008-12-05 08:51:53
|
Update of /cvsroot/aolserver/aolserver/nsext In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27473/nsext Modified Files: nsext.c Log Message: - provide names for all Ns_Mutex to report meaningful output in aolserver statistics - set version number to 4.5.0p1 to differentiate from 4.5.0 unpatched release Index: nsext.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsext/nsext.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** nsext.c 19 Mar 2003 13:54:48 -0000 1.12 --- nsext.c 5 Dec 2008 08:51:44 -0000 1.13 *************** *** 342,345 **** --- 342,346 ---- ctx->ident[0] = '\0'; Ns_MutexInit(&ctx->muIdent); + Ns_MutexSetName(&ctx->muIdent, "nsext:ident"); ctx->param = Ns_ConfigGetValue(configPath, CONFIG_PARAM); ctx->path = Ns_ConfigGetValue(configPath, CONFIG_LOCALDAEMON); |
From: <gne...@us...> - 2008-12-05 08:51:53
|
Update of /cvsroot/aolserver/aolserver/nsd In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27473/nsd Modified Files: limits.c pools.c server.c Log Message: - provide names for all Ns_Mutex to report meaningful output in aolserver statistics - set version number to 4.5.0p1 to differentiate from 4.5.0 unpatched release Index: limits.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/limits.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** limits.c 28 Mar 2005 00:06:44 -0000 1.10 --- limits.c 5 Dec 2008 08:51:43 -0000 1.11 *************** *** 274,277 **** --- 274,278 ---- limitsPtr->name = Tcl_GetHashKey(&limtable, hPtr); Ns_MutexInit(&limitsPtr->lock); + Ns_MutexSetName(&limitsPtr->lock, "ns:limits"); limitsPtr->nrunning = limitsPtr->nwaiting = 0; limitsPtr->ntimeout = limitsPtr->ndropped = limitsPtr->noverflow = 0; Index: pools.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/pools.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pools.c 26 Oct 2007 23:14:17 -0000 1.12 --- pools.c 5 Dec 2008 08:51:43 -0000 1.13 *************** *** 383,386 **** --- 383,387 ---- poolPtr = ns_calloc(sizeof(Pool), 1); Ns_MutexInit(&poolPtr->lock); + Ns_MutexSetName(&poolPtr->lock, "ns:pools"); Ns_CondInit(&poolPtr->cond); Tcl_SetHashValue(hPtr, poolPtr); Index: server.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/server.c,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** server.c 7 Jul 2006 03:27:22 -0000 1.46 --- server.c 5 Dec 2008 08:51:43 -0000 1.47 *************** *** 337,344 **** --- 337,346 ---- Ns_MutexInit(&servPtr->tcl.llock); + Ns_MutexSetName(&servPtr->tcl.llock, "ns:tcl.llock"); Ns_CondInit(&servPtr->tcl.lcond); Ns_RWLockInit(&servPtr->tcl.tlock); Ns_CsInit(&servPtr->tcl.olock); Ns_MutexInit(&servPtr->tcl.plock); + Ns_MutexSetName(&servPtr->tcl.plock, "ns:tcl.plock"); Ns_RWLockInit(&servPtr->tcl.slock); Tcl_InitHashTable(&servPtr->tcl.packages, TCL_STRING_KEYS); |
From: <gne...@us...> - 2008-12-05 08:51:52
|
Update of /cvsroot/aolserver/aolserver/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27473/include Modified Files: ns.h Log Message: - provide names for all Ns_Mutex to report meaningful output in aolserver statistics - set version number to 4.5.0p1 to differentiate from 4.5.0 unpatched release Index: ns.h =================================================================== RCS file: /cvsroot/aolserver/aolserver/include/ns.h,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** ns.h 7 Jul 2006 03:27:22 -0000 1.86 --- ns.h 5 Dec 2008 08:51:44 -0000 1.87 *************** *** 47,51 **** + NS_RELEASE_SERIAL) #define NS_VERSION "4.5" ! #define NS_PATCH_LEVEL "4.5.0" #define NS_ALPHA_RELEASE 0 --- 47,51 ---- + NS_RELEASE_SERIAL) #define NS_VERSION "4.5" ! #define NS_PATCH_LEVEL "4.5.0p1" #define NS_ALPHA_RELEASE 0 |
From: <gne...@us...> - 2008-10-12 11:17:31
|
Update of /cvsroot/aolserver/aolserver/tcl In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17325 Modified Files: stats.tcl Log Message: - fixed Tcl expressions such they are compiled into byte code Index: stats.tcl =================================================================== RCS file: /cvsroot/aolserver/aolserver/tcl/stats.tcl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stats.tcl 1 Feb 2003 23:44:25 -0000 1.3 --- stats.tcl 12 Oct 2008 09:00:34 -0000 1.4 *************** *** 37,41 **** proc _ns_stats.handleUrl {} { ! set page [ns_conn urlv [expr [ns_conn urlc] - 1]] switch -exact $page { --- 37,41 ---- proc _ns_stats.handleUrl {} { ! set page [ns_conn urlv [expr {[ns_conn urlc] - 1}]] switch -exact $page { *************** *** 68,72 **** proc _ns_stats.header {{stat ""}} { ! if [string length $stat] { set title "AOLserver Stats: [ns_info hostname] - $stat" set nav "<a href=index.adp><font color=#ffffff>Main Menu</font></a> > <font color=#ffcc00>$stat</font>" --- 68,72 ---- proc _ns_stats.header {{stat ""}} { ! if {[string length $stat]} { set title "AOLserver Stats: [ns_info hostname] - $stat" set nav "<a href=index.adp><font color=#ffffff>Main Menu</font></a> > <font color=#ffcc00>$stat</font>" *************** *** 142,146 **** foreach {k v} $stats { ! if {[string match mtime $k]} { lappend s [_ns_stats.fmtTime $v] } else { --- 142,146 ---- foreach {k v} $stats { ! if {"mtime" eq $k} { lappend s [_ns_stats.fmtTime $v] } else { *************** *** 151,155 **** } ! set rows [_ns_stats.sortResults $results [expr $col - 1] $numericSort $reverseSort] set html [_ns_stats.header ADP] --- 151,155 ---- } ! set rows [_ns_stats.sortResults $results [expr {$col - 1}] $numericSort $reverseSort] set html [_ns_stats.header ADP] *************** *** 182,186 **** set colTitles [list Cache Max Current Entries Flushes Hits Misses "Hit Rate"] ! set rows [_ns_stats.sortResults $results [expr $col - 1] $numericSort $reverseSort] set html [_ns_stats.header Cache] --- 182,186 ---- set colTitles [list Cache Max Current Entries Flushes Hits Misses "Hit Rate"] ! set rows [_ns_stats.sortResults $results [expr {$col - 1}] $numericSort $reverseSort] set html [_ns_stats.header Cache] *************** *** 215,219 **** set contention 0.0 } else { ! set contention [expr double($nbusy*100.0/$nlock)] } --- 215,219 ---- set contention 0.0 } else { ! set contention [expr {double($nbusy*100.0/$nlock)}] } *************** *** 221,225 **** } ! foreach result [_ns_stats.sortResults $results [expr $col - 1] $numericSort $reverseSort] { set name [lindex $result 0] set owner [lindex $result 1] --- 221,225 ---- } ! foreach result [_ns_stats.sortResults $results [expr {$col - 1}] $numericSort $reverseSort] { set name [lindex $result 0] set owner [lindex $result 1] *************** *** 265,269 **** set f [open [ns_info log]] seek $f 0 end ! set n [expr [tell $f] -4000] if {$n < 0} { --- 265,269 ---- set f [open [ns_info log]] seek $f 0 end ! set n [expr {[tell $f] -4000}] if {$n < 0} { *************** *** 326,336 **** set np [lindex $b 3] set nr [lindex $b 4] ! set nu [expr $ng - $np] ! set na [expr $nu * $bs] ! incr tops [expr $ng + $np] incr tlocks [lindex $b 5] incr twaits [lindex $b 6] ! incr tfree [expr $bs * $nf] incr talloc $na incr trequest $nr --- 326,336 ---- set np [lindex $b 3] set nr [lindex $b 4] ! set nu [expr {$ng - $np}] ! set na [expr {$nu * $bs}] ! incr tops [expr {$ng + $np}] incr tlocks [lindex $b 5] incr twaits [lindex $b 6] ! incr tfree [expr {$bs * $nf}] incr talloc $na incr trequest $nr *************** *** 338,343 **** if {$nr != 0} { ! set ov [expr $na - $nr] ! set op [format %4.2f%% [expr $ov.0 * 100 / $nr.0]] } else { set ov "N/A" --- 338,343 ---- if {$nr != 0} { ! set ov [expr {$na - $nr}] ! set op [format %4.2f%% [expr {$ov * 100.0} / $nr]] } else { set ov "N/A" *************** *** 362,371 **** } ! set ov [expr $talloc - $trequest] ! set op [format %4.2f [expr $ov.0 * 100 / $trequest.0]] ! set av [format %4.2f [expr 100.0 - ($tlocks.0 * 100) / $tops.0]] if {$tlocks > 0} { ! set wr [format %4.2f [expr $twaits.0 / $tlocks.0]] } else { set wr N/A --- 362,371 ---- } ! set ov [expr {$talloc - $trequest}] ! set op [format %4.2f [expr {$ov * 100.0 / $trequest}]] ! set av [format %4.2f [expr {100.0 - ($tlocks * 100.0) / $tops}]] if {$tlocks > 0} { ! set wr [format %4.2f [expr {$twaits*1.0 / $tlocks}]] } else { set wr N/A *************** *** 467,471 **** if [catch { ! set duration [expr $lastend - $laststart] }] { set duration "0" --- 467,471 ---- if [catch { ! set duration [expr {$lastend - $laststart}] }] { set duration "0" *************** *** 474,482 **** set state "pending" ! if [_ns_stats.isThreadSuspended $flags] { set state suspended } ! if [_ns_stats.isThreadRunning $flags] { set state running } --- 474,482 ---- set state "pending" ! if {[_ns_stats.isThreadSuspended $flags]} { set state suspended } ! if {[_ns_stats.isThreadRunning $flags]} { set state running } *************** *** 487,491 **** set rows "" ! foreach s [_ns_stats.sortResults $scheduledProcs [expr $col - 1] $numericSort $reverseSort] { set id [lindex $s 0] set state [lindex $s 1] --- 487,491 ---- set rows "" ! foreach s [_ns_stats.sortResults $scheduledProcs [expr {$col - 1}] $numericSort $reverseSort] { set id [lindex $s 0] set state [lindex $s 1] *************** *** 525,529 **** set rows "" ! foreach t [_ns_stats.sortResults [ns_info threads] [expr $col - 1] $numericSort $reverseSort] { set thread [lindex $t 0] set parent [lindex $t 1] --- 525,529 ---- set rows "" ! foreach t [_ns_stats.sortResults [ns_info threads] [expr {$col - 1}] $numericSort $reverseSort] { set thread [lindex $t 0] set parent [lindex $t 1] *************** *** 534,542 **** set arg [lindex $t 6] ! if {[string match "p:0x0" $proc]} { set proc "NULL" } ! if {[string match "a:0x0" $arg]} { set arg "NULL" } --- 534,542 ---- set arg [lindex $t 6] ! if {"p:0x0" eq $proc} { set proc "NULL" } ! if {"a:0x0" eq $arg} { set arg "NULL" } *************** *** 555,559 **** set numCols [llength $colTitles] ! for {set colNum 1} {$colNum < [expr $numCols + 1]} {incr colNum} { if {$colNum == $selectedColNum} { set colHdrColor($colNum) "#666666" --- 555,559 ---- set numCols [llength $colTitles] ! for {set colNum 1} {$colNum < [expr {$numCols + 1}]} {incr colNum} { if {$colNum == $selectedColNum} { set colHdrColor($colNum) "#666666" *************** *** 580,584 **** if {$i == $selectedColNum} { ! if $reverseSort { append url "?reversesort=0" } else { --- 580,584 ---- if {$i == $selectedColNum} { ! if {$reverseSort} { append url "?reversesort=0" } else { *************** *** 591,598 **** set colAlign "left" ! if [llength $colAlignment] { ! set align [lindex $colAlignment [expr $i - 1]] ! if [string length $align] { set colAlign $align } --- 591,598 ---- set colAlign "left" ! if {[llength $colAlignment]} { ! set align [lindex $colAlignment [expr {$i - 1}]] ! if {[string length $align]} { set colAlign $align } *************** *** 614,621 **** set colAlign "left" ! if [llength $colAlignment] { ! set align [lindex $colAlignment [expr $i - 1]] ! if [string length $align] { set colAlign $align } --- 614,621 ---- set colAlign "left" ! if {[llength $colAlignment]} { ! set align [lindex $colAlignment [expr {$i - 1}]] ! if {[string length $align]} { set colAlign $align } *************** *** 679,691 **** proc _ns_stats.isThreadSuspended {flags} { ! return [expr $flags & [_ns_stats.getSchedFlag paused]] } proc _ns_stats.isThreadRunning {flags} { ! return [expr $flags & [_ns_stats.getSchedFlag running]] } proc _ns_stats.getSchedFlagTypes {flags} { ! if [expr $flags & [_ns_stats.getSchedFlag once]] { set types "once" } else { --- 679,691 ---- proc _ns_stats.isThreadSuspended {flags} { ! return [expr {$flags & [_ns_stats.getSchedFlag paused]}] } proc _ns_stats.isThreadRunning {flags} { ! return [expr {$flags & [_ns_stats.getSchedFlag running]}] } proc _ns_stats.getSchedFlagTypes {flags} { ! if [expr {$flags & [_ns_stats.getSchedFlag once]}] { set types "once" } else { *************** *** 693,705 **** } ! if [expr $flags & [_ns_stats.getSchedFlag daily]] { lappend types "daily" } ! if [expr $flags & [_ns_stats.getSchedFlag weekly]] { lappend types "weekly" } ! if [expr $flags & [_ns_stats.getSchedFlag thread]] { lappend types "thread" } --- 693,705 ---- } ! if [expr {$flags & [_ns_stats.getSchedFlag daily]}] { lappend types "daily" } ! if [expr {$flags & [_ns_stats.getSchedFlag weekly]}] { lappend types "weekly" } ! if [expr {$flags & [_ns_stats.getSchedFlag thread]}] { lappend types "thread" } *************** *** 714,726 **** if {$seconds < 3600} { ! set mins [expr $seconds/60] ! set secs [expr $seconds - ($mins * 60)] return "${mins}:${secs} (m:s)" } ! set hours [expr $seconds/3600] set mins [expr ($seconds - ($hours * 3600))/60] ! set secs [expr $seconds - (($hours * 3600) + ($mins * 60))] return "${hours}:${mins}:${secs} (h:m:s)" --- 714,726 ---- if {$seconds < 3600} { ! set mins [expr {$seconds/60}] ! set secs [expr {$seconds - ($mins * 60)}] return "${mins}:${secs} (m:s)" } ! set hours [expr {$seconds/3600}] set mins [expr ($seconds - ($hours * 3600))/60] ! set secs [expr {$seconds - (($hours * 3600) + ($mins * 60))}] return "${hours}:${mins}:${secs} (h:m:s)" *************** *** 751,756 **** set v2 [lindex $v2 $_sortListTmp(field)] ! if $_sortListTmp(numeric) { ! if $_sortListTmp(reverse) { set cmp [_ns_stats.cmpNumeric $v2 $v1] } else { --- 751,756 ---- set v2 [lindex $v2 $_sortListTmp(field)] ! if {$_sortListTmp(numeric)} { ! if {$_sortListTmp(reverse)} { set cmp [_ns_stats.cmpNumeric $v2 $v1] } else { *************** *** 758,762 **** } } else { ! if $_sortListTmp(reverse) { set cmp [string compare $v2 $v1] } else { --- 758,762 ---- } } else { ! if {$_sortListTmp(reverse)} { set cmp [string compare $v2 $v1] } else { |
From: <jh...@us...> - 2008-10-06 22:34:03
|
Update of /cvsroot/aolserver/havardblog/tcl In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4271/tcl Modified Files: init.tcl Log Message: Corrected serious problem with referencing templates... i.e. it calls [ns_info pageroot] rather than assuming the base is always pageroot. This was breaking the do_post.adp script's call to regenerate the index page since it was trying to reference templates based in the /admin/ directory! Index: init.tcl =================================================================== RCS file: /cvsroot/aolserver/havardblog/tcl/init.tcl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** init.tcl 15 Sep 2008 20:06:20 -0000 1.1 --- init.tcl 6 Oct 2008 22:33:55 -0000 1.2 *************** *** 14,20 **** ! set mainStuff [ns_adp_parse -file template/article.adp] ! set rPole [ns_adp_parse -file template/rpole.adp] ! ns_return 200 "text/html" [ns_adp_parse -file template/template.adp] } else { ns_returnnotfound --- 14,20 ---- ! set mainStuff [ns_adp_parse -file [ns_info pageroot]/template/article.adp] ! set rPole [ns_adp_parse -file [ns_info pageroot]/template/rpole.adp] ! ns_return 200 "text/html" [ns_adp_parse -file [ns_info pageroot]/template/template.adp] } else { ns_returnnotfound *************** *** 23,26 **** --- 23,27 ---- proc init_entries_nsv {} { + set pageroot [ns_config -exact ns/server/jhdotcom pageroot] set qry "SELECT ARTICLE.*,AUTHOR.PERSONAL_NAME FROM ARTICLE,AUTHOR WHERE AUTHOR.ID=ARTICLE.AUTHOR ORDER BY PUBDATE DESC, UPDATED DESC" catch { *************** *** 38,42 **** set pubdate [string map {- /} $pubdate] nsv_set entries "/article/${pubdate}/${slug}/article.html" [list $slug $pubdate $updated $author $title $lead $body] - #set mainStuff "$mainStuff [ns_adp_parse -file template/entry.adp]" } ns_db releasehandle $hdl --- 39,42 ---- *************** *** 45,48 **** --- 45,49 ---- proc most_recent_articles {n} { + set pageroot [ns_config -exact ns/server/jhdotcom pageroot] set mainStuff "" set qry "SELECT ARTICLE.*,AUTHOR.PERSONAL_NAME FROM ARTICLE,AUTHOR WHERE AUTHOR.ID=ARTICLE.AUTHOR ORDER BY PUBDATE DESC, UPDATED DESC LIMIT ${n}" *************** *** 59,68 **** set body [subst [ns_set get $res body ]] set pubdate [string map {- /} $pubdate] ! set mainStuff "$mainStuff [ns_adp_parse -file template/entry.adp]" } ns_db releasehandle $hdl } ! set rPole [ns_adp_parse -file template/rpole.adp] ! nsv_set cache homepage [ns_adp_parse -file template/template.adp] } --- 60,69 ---- set body [subst [ns_set get $res body ]] set pubdate [string map {- /} $pubdate] ! set mainStuff "$mainStuff [ns_adp_parse -file [ns_info pageroot]/template/entry.adp]" } ns_db releasehandle $hdl } ! set rPole [ns_adp_parse -file [ns_info pageroot]/template/rpole.adp] ! nsv_set cache homepage [ns_adp_parse -file [ns_info pageroot]/template/template.adp] } *************** *** 71,77 **** --- 72,83 ---- } + proc do_cal {} { + ns_return 404 "text/html" [ns_adp_parse -file [ns_info pageroot]/global/file-not-found.adp] + } + ns_register_proc GET /article do_article ns_register_proc -noinherit GET / do_home_page ns_register_proc -noinherit GET /index.html do_home_page + ns_register_proc GET /cal do_cal init_entries_nsv |
From: <jh...@us...> - 2008-10-06 22:34:03
|
Update of /cvsroot/aolserver/havardblog/www/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4271/www/admin Modified Files: do_post.adp Log Message: Corrected serious problem with referencing templates... i.e. it calls [ns_info pageroot] rather than assuming the base is always pageroot. This was breaking the do_post.adp script's call to regenerate the index page since it was trying to reference templates based in the /admin/ directory! Index: do_post.adp =================================================================== RCS file: /cvsroot/aolserver/havardblog/www/admin/do_post.adp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** do_post.adp 15 Sep 2008 20:06:23 -0000 1.1 --- do_post.adp 6 Oct 2008 22:33:55 -0000 1.2 *************** *** 33,38 **** nsv_set entries "/article/${pubdate}/${slug}/article.html" [list $slug $pubdate $updated $author $title $lead $body] ns_db releasehandle $hdl - most_recent_articles 15 } } %> --- 33,38 ---- nsv_set entries "/article/${pubdate}/${slug}/article.html" [list $slug $pubdate $updated $author $title $lead $body] ns_db releasehandle $hdl } + most_recent_articles 15 } %> |
From: <jh...@us...> - 2008-09-15 20:06:17
|
Update of /cvsroot/aolserver/havardblog/www/template In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18580/www/template Added Files: article.adp entry.adp rpole.adp template.adp Log Message: Initial import of Havard's Crappy Blog as seen at http://johnhavard.com/ --- NEW FILE: article.adp --- <div class="journalBox"><!-- jbox --> <div class="jbHeader"> <div class="jbTitle"><%= $title %></div> <div class="jbAuthor">posted by <%= $author %> on <%= $pubdate %></div> </div><!-- end jbheader --> <!-- entry body --> <%= $body %> <!-- /entry body --> <div class="jbFooter"> <!-- last updated <%= $updated %> --> <!-- tag soup --> </div> </div><!-- /jbox --> <div style="color: white; text-align: center; font-size: 6pt; ">last updated <%= $updated %> </div> --- NEW FILE: entry.adp --- <div class="journalBox"> <div class="jbHeader"> <div class="jbTitle"><%= $title %></div> <div class="jbAuthor">by <%= $author %> on <%= $pubdate %></div> </div> <!-- entry body --> <%= $lead %> <!-- /entry body --> <div class="jbFooter"> <div class="jbfRight"> <a href="/article/<%= $pubdate %>/<%= $slug %>/article.html">Read More</a> </div> </div> </div><!-- /jbox --> --- NEW FILE: rpole.adp --- <div class="rbox"> <div class="rboxHeader">Links</div> <div class="rboxMidder"> <ul> <li class="rboxOdd"><a href="http://kjan.wx.hxi.us/">Jackson Weather</a></li> <li class="rboxEven"><a href="http://www.errantstory.com/">Errant Story</a></li> <li class="rboxOdd"><a href="http://thedailywtf.com/">The Daily WTF?!</a></li> <li class="rboxEven"><a href="http://www.vestasys.org/">Vesta</a></li> <li class="rboxOdd"><a href="http://www.awips.org/">Open AWIPS</a></li> <!-- <li class="rboxEven"><a href="">bar</a></li> <li class="rboxOdd"><a href="">foo</a></li> <li class="rboxEven"><a href="">bar</a></li> --> </ul> </div> <div class="rboxFooter"> </div> </div> <div class="rbox"> <div class="rboxHeader">Friends</div> <div class="rboxMidder"> <ul> <li class="rboxOdd"><a href="http://robsayers.com/">Rob Sayers</a></li> <li class="rboxEven"><a href="http://www.dossy.org/">Dossy Shiobara</a></li> <li class="rboxOdd"><a href="http://brianbaggett.com/">Brian Baggett</a></li> <li class="rboxEven"><a href="">I don't have any more friends :(</a></li> <!-- <li class="rboxOdd"><a href="">foo</a></li> <li class="rboxEven"><a href="">bar</a></li> <li class="rboxOdd"><a href="">foo</a></li> <li class="rboxEven"><a href="">bar</a></li> --> </ul> </div> <div class="rboxFooter"> </div> </div> --- NEW FILE: template.adp --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta name="generator" content="HTML Tidy, see www.w3.org" /> <title>JohnHavard.com</title> <link type="text/css" rel="stylesheet" href="/main.css" /> <!-- <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.johnhavard.com/index.rss" /> --> </head> <body> <div class="header"> <div class="headerTop"> </div> <div class="headerMiddle"> JohnHavard.com </div> <div class="headerBottom"> <div class="hbRight"> <a href="http://www.johnhavard.com/">Home</a> · <a href="http://kjan.wx.hxi.us/">Weather</a> · <a href="/contact.php">Contact</a> </div> <div class="hbLeft"> </div> <div class="hbCenter"> </div> </div> </div> <div class="midder"> <div class="rPole"> <%= $rPole %> </div> <div class="mainStuff"> <%= $mainStuff %> </div> </div> <div class="footer"> <p>This site, it's design and most content Copyright © 1998-2008 John Havard. All rights reserved. Everything else is disclaimed. This site is dangerous and should not be used while driving or operating heavy machinery and should not be used by women who are pregnant, believe they are pregnant or breast-feeding as prolonged use may cause severe complications. As of this writing, we have gone 3658 days without a blogging-related accident. This page is quite likely <a href= "http://validator.w3.org/check?uri=referer">valid XHTML</a>. Powered by your mom.</p> </div> </body> </html> |
From: <jh...@us...> - 2008-09-15 20:06:15
|
Update of /cvsroot/aolserver/havardblog/tcl In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18580/tcl Added Files: init.tcl Log Message: Initial import of Havard's Crappy Blog as seen at http://johnhavard.com/ --- NEW FILE: init.tcl --- proc do_article {} { set mainStuff "" # /article/YYYY/MM/DD/slug/article.html if {[nsv_exists entries [ns_conn url]] == 1} { set entry [nsv_get entries [ns_conn url]] set slug [lindex $entry 0] set pubdate [lindex $entry 1] set updated [lindex $entry 2] set author [lindex $entry 3] set title [lindex $entry 4] set lead [lindex $entry 5] set body [lindex $entry 6] set mainStuff [ns_adp_parse -file template/article.adp] set rPole [ns_adp_parse -file template/rpole.adp] ns_return 200 "text/html" [ns_adp_parse -file template/template.adp] } else { ns_returnnotfound } } proc init_entries_nsv {} { set qry "SELECT ARTICLE.*,AUTHOR.PERSONAL_NAME FROM ARTICLE,AUTHOR WHERE AUTHOR.ID=ARTICLE.AUTHOR ORDER BY PUBDATE DESC, UPDATED DESC" catch { set hdl [ns_db gethandle pool1] set res [ns_db select $hdl $qry] while {[ns_db getrow $hdl $res]} { set slug [subst [ns_set get $res slug ]] set pubdate [subst [ns_set get $res pubdate]] set updated [subst [ns_set get $res updated]] set author [subst [ns_set get $res author ]] set title [subst [ns_set get $res title ]] set lead [subst [ns_set get $res lead ]] set body [subst [ns_set get $res body ]] set pubdate [string map {- /} $pubdate] nsv_set entries "/article/${pubdate}/${slug}/article.html" [list $slug $pubdate $updated $author $title $lead $body] #set mainStuff "$mainStuff [ns_adp_parse -file template/entry.adp]" } ns_db releasehandle $hdl } } proc most_recent_articles {n} { set mainStuff "" set qry "SELECT ARTICLE.*,AUTHOR.PERSONAL_NAME FROM ARTICLE,AUTHOR WHERE AUTHOR.ID=ARTICLE.AUTHOR ORDER BY PUBDATE DESC, UPDATED DESC LIMIT ${n}" catch { set hdl [ns_db gethandle pool1] set res [ns_db select $hdl $qry] while {[ns_db getrow $hdl $res]} { set slug [subst [ns_set get $res slug ]] set pubdate [subst [ns_set get $res pubdate]] set updated [subst [ns_set get $res updated]] set author [subst [ns_set get $res author ]] set title [subst [ns_set get $res title ]] set lead [subst [ns_set get $res lead ]] set body [subst [ns_set get $res body ]] set pubdate [string map {- /} $pubdate] set mainStuff "$mainStuff [ns_adp_parse -file template/entry.adp]" } ns_db releasehandle $hdl } set rPole [ns_adp_parse -file template/rpole.adp] nsv_set cache homepage [ns_adp_parse -file template/template.adp] } proc do_home_page {} { ns_return 200 "text/html" [nsv_get cache homepage] } ns_register_proc GET /article do_article ns_register_proc -noinherit GET / do_home_page ns_register_proc -noinherit GET /index.html do_home_page init_entries_nsv most_recent_articles 15 ns_schedule_proc -thread 900 { most_recent_articles 15 } |
From: <jh...@us...> - 2008-09-15 20:06:15
|
Update of /cvsroot/aolserver/havardblog/www/admin In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18580/www/admin Added Files: do_post.adp index.html post.adp Log Message: Initial import of Havard's Crappy Blog as seen at http://johnhavard.com/ --- NEW FILE: do_post.adp --- <% set title [ns_dbquotevalue [ns_queryget title]] set user [ns_dbquotevalue [ns_queryget username]] set pass [ns_dbquotevalue [ns_queryget password]] set date [ns_dbquotevalue [ns_queryget date]] set slug [ns_dbquotevalue [ns_queryget slug]] set lead [ns_dbquotevalue [ns_queryget lead]] set body [ns_dbquotevalue [ns_queryget body]] set qry "INSERT INTO ARTICLE VALUES ($slug, $date, now(), (SELECT ID FROM AUTHOR WHERE ID = $user and PASSWORD = $pass), $lead, $body, $title)" set hdl [ns_db gethandle pool1] if {[catch {ns_db dml $hdl $qry} res]} { ns_adp_puts "post probably failed, hit back and try again" ns_adp_puts "<pre>$res</pre> } else { ns_adp_puts "post was a success!" ns_adp_puts "<pre>$res</pre>" catch { set qry "SELECT ARTICLE.*,AUTHOR.PERSONAL_NAME FROM ARTICLE,AUTHOR WHERE AUTHOR.ID=ARTICLE.AUTHOR AND PUBDATE = ${date} AND SLUG = ${slug}" set res [ns_db 1row $hdl $qry] set slug [subst [ns_set get $res slug ]] set pubdate [subst [ns_set get $res pubdate]] set updated [subst [ns_set get $res updated]] set author [subst [ns_set get $res author ]] set title [subst [ns_set get $res title ]] set lead [subst [ns_set get $res lead ]] set body [subst [ns_set get $res body ]] set pubdate [string map {- /} $pubdate] nsv_set entries "/article/${pubdate}/${slug}/article.html" [list $slug $pubdate $updated $author $title $lead $body] ns_db releasehandle $hdl most_recent_articles 15 } } %> --- NEW FILE: index.html --- go away --- NEW FILE: post.adp --- <html> <head> <title>Post an article</title> </head> <body> <table> <form method="POST" action="do_post.adp"> <tr> <td>Title</td> <td><input name="title" size="80" value=""/></td> </tr> <tr> <td>username</td> <td><input name="username" value=""/></td> </tr> <tr> <td>password</td> <td><input type="password" name="password" value=""/></td> </tr> <tr> <td>date (YYYY/MM/DD)</td> <td><input name="date" value=""/></td> </tr> <tr> <td>slug</td> <td><input name="slug" value=""/></td> </tr> <tr> <td>lead</td> <td><textarea name="lead" cols="80" rows="5"></textarea> </tr> <tr> <td>body</td> <td><textarea name="body" cols="80" rows="12"></textarea> </tr> <tr> <td><input type="submit"></td> <td><input type="reset"></td> </tr> </form> </table> </body> </html> |
From: <jh...@us...> - 2008-09-15 20:06:14
|
Update of /cvsroot/aolserver/havardblog/www In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18580/www Added Files: main.css Log Message: Initial import of Havard's Crappy Blog as seen at http://johnhavard.com/ --- NEW FILE: main.css --- body { width : 950px; margin : auto; background-color : black; color : white; margin-top : 1em; margin-bottom : 3em; font-family : arial, helvetica, sans-serif } .hypoClearingAgent { clear : both } .rPole { width : 350px; float : right; font-size : 10pt } .mainStuff { margin-right : 370px } .footer { border-width : 2px; border-color : #444466; border-top-style : solid; background-color : #000000; color : #c4c4c4; font-weight : regular; font-size : 6pt; font-family : arial, helvetica, sans-serif; margin-bottom : 1em; margin-top : 1em; clear : both } .footer p { width : 70%; margin : auto } .footer a { color : #c4c4c4 } .footer a:visited { color : #c4c4c4 } .footer a:hover { color : white } .midder { margin-bottom : 1em } .header { border-width : 2px; border-color : #444466; border-style : solid; background-color : #111133; color : yellow; font-weight : bold; font-family : arial, helvetica, sans-serif; margin-bottom : 1em; clear : both } .headerTop { font-size : 12pt } .headerMiddle { background-color : #444466; color : #111133; font-weight : bold; font-size : 18pt } .headerBottom { font-size : 12pt } .hbLeft { float : left; text-align : left } .hbRight { float : right; text-align : right; margin-right : 5px } .hbCenter { margin : auto; text-align : center; font-weight : regular; font-size : 12pt } .header a { color : yellow; font-weight : bold; text-decoration : none } .header a:hover { color : yellow; font-weight : bold; text-decoration : none } .header a:visited { color : yellow; font-weight : bold; text-decoration : none } .rbox { border-width : 2px; border-style : solid; border-color : #d4d4d4; background-color : #d4d4d4; font-size : 12pt; margin-bottom : 15px } .rboxHeader { font-weight : bold; color : white; background-color : #111133; text-align : center } .rboxFooter { background-color : #111133 } .rboxMidder { background-color : #d4d4d4; color : #111133 } .rboxOdd { background-color : #d4d4d4 } .rboxEven { background-color : #f0f0f0 } .journalBox { border-width : 2px; border-color : #444466; border-style : solid; background-color : #ccccff; color : black; font-weight : regular; font-family : arial, helvetica, sans-serif; margin-bottom : 1em } .journalBox p { margin : 0; margin-bottom : 7px; margin-left : 5px; margin-right : 5px } .jbHeader { background-color : #111133; font-size : 12pt; color : white } .jbFooter { background-color : #111133; font-weight : regular; font-size : 8pt; color : yellow } .jbFooter a, a:hover, a:visited { color : yellow; text-decoration : none } .jbhRight { float : right } .jbfRight { float : right; width : 120px; text-align : right; margin-right : 5px } .jbfRight a { color : yellow; text-decoration : none } .jbfRight a:hover { color : yellow; text-decoration : none } .jbfRight a:visited { color : yellow; text-decoration : none } .rbox a, a:visited, a:hover { color : #111133; text-decoration : none } .rbox ul { list-style : none; list-style-position : inside; padding : 0; margin : 0 } .rbox li { padding-left : 5px } .jbAuthor { font-size : 8pt; font-weight : bold; padding-bottom : 3px } .jbTitle { font-weight : bold; font-size : 12pt } |
From: <jh...@us...> - 2008-09-15 20:06:13
|
Update of /cvsroot/aolserver/havardblog In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18580 Added Files: README schema.sql Log Message: Initial import of Havard's Crappy Blog as seen at http://johnhavard.com/ --- NEW FILE: README --- This blog was initially a couple of .adp scripts, but was changed at the urging of Dossy. To get ridiculous speeds everything is cached, once again at the urging of Dossy. It's still a barely usable app, but it does serve my minimal needs. My hope is that someone will take this code and do something useful, such as create a fully-featured blogging app for AOLserver. I'll assume the person using this software is capable of configuring AOLserver with database pool named 'pool1'. I used postgresql, but others will likely work with the included schema. YMMV. TODO: RSS/Atom generator Edit/Delete posts Better admin section Initial setup wizard? --- NEW FILE: schema.sql --- --- This was written for PostgreSQL. CREATE DOMAIN AUTHOR_ID AS VARCHAR(16) NOT NULL; CREATE DOMAIN EMAIL AS VARCHAR(128) NOT NULL; CREATE DOMAIN SLUG AS VARCHAR(32) NOT NULL; CREATE DOMAIN TAG_T AS VARCHAR(64) NOT NULL; CREATE TABLE AUTHOR ( ID AUTHOR_ID PRIMARY KEY, PERSONAL_NAME VARCHAR(64) NOT NULL, DISPLAY_EMAIL EMAIL, REAL_EMAIL EMAIL, PASSWORD VARCHAR(64) NOT NULL ); CREATE TABLE ARTICLE ( SLUG SLUG NOT NULL, PUBDATE DATE NOT NULL, UPDATED TIMESTAMP NOT NULL, AUTHOR AUTHOR_ID REFERENCES AUTHOR(ID) NOT NULL, LEAD TEXT NOT NULL, BODY TEXT NOT NULL, TITLE VARCHAR(128) NOT NULL, PRIMARY KEY (SLUG, PUBDATE) ); |
From: <jh...@us...> - 2008-09-15 20:04:30
|
Update of /cvsroot/aolserver/havardblog/www/template In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18068/template Log Message: Directory /cvsroot/aolserver/havardblog/www/template added to the repository |
From: <jh...@us...> - 2008-09-15 20:04:22
|
Update of /cvsroot/aolserver/havardblog/www/admin In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18055/admin Log Message: Directory /cvsroot/aolserver/havardblog/www/admin added to the repository |