You can subscribe to this list here.
2005 |
Jan
|
Feb
(32) |
Mar
(56) |
Apr
(92) |
May
(39) |
Jun
(226) |
Jul
(98) |
Aug
(66) |
Sep
|
Oct
(153) |
Nov
(43) |
Dec
(42) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(97) |
Feb
(141) |
Mar
(147) |
Apr
(80) |
May
(51) |
Jun
(93) |
Jul
(88) |
Aug
(50) |
Sep
(179) |
Oct
(48) |
Nov
(82) |
Dec
(71) |
2007 |
Jan
(42) |
Feb
(46) |
Mar
(123) |
Apr
(21) |
May
(139) |
Jun
(59) |
Jul
(34) |
Aug
(57) |
Sep
(47) |
Oct
(137) |
Nov
(49) |
Dec
(12) |
2008 |
Jan
(10) |
Feb
(8) |
Mar
(63) |
Apr
(17) |
May
(34) |
Jun
(38) |
Jul
(16) |
Aug
(62) |
Sep
(9) |
Oct
(121) |
Nov
(38) |
Dec
(4) |
2009 |
Jan
|
Feb
(11) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(4) |
Apr
(10) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(12) |
2012 |
Jan
(26) |
Feb
(1) |
Mar
(15) |
Apr
(1) |
May
(1) |
Jun
(7) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(52) |
Nov
(8) |
Dec
(25) |
2013 |
Jan
(35) |
Feb
(14) |
Mar
(10) |
Apr
(10) |
May
(29) |
Jun
(16) |
Jul
(5) |
Aug
(8) |
Sep
(8) |
Oct
(6) |
Nov
(1) |
Dec
(3) |
2014 |
Jan
(16) |
Feb
(13) |
Mar
(5) |
Apr
(9) |
May
(21) |
Jun
(6) |
Jul
(5) |
Aug
(2) |
Sep
(59) |
Oct
(115) |
Nov
(122) |
Dec
(45) |
2015 |
Jan
(31) |
Feb
(32) |
Mar
(19) |
Apr
(25) |
May
(3) |
Jun
(4) |
Jul
(18) |
Aug
(3) |
Sep
(23) |
Oct
(11) |
Nov
(17) |
Dec
(12) |
2016 |
Jan
(20) |
Feb
(27) |
Mar
(20) |
Apr
(40) |
May
(35) |
Jun
(48) |
Jul
(44) |
Aug
(51) |
Sep
(18) |
Oct
(42) |
Nov
(39) |
Dec
(29) |
2017 |
Jan
(37) |
Feb
(34) |
Mar
(20) |
Apr
(37) |
May
(10) |
Jun
(2) |
Jul
(14) |
Aug
(15) |
Sep
(25) |
Oct
(29) |
Nov
(15) |
Dec
(29) |
2018 |
Jan
(5) |
Feb
(15) |
Mar
(6) |
Apr
(20) |
May
(39) |
Jun
(39) |
Jul
(17) |
Aug
(20) |
Sep
(10) |
Oct
(17) |
Nov
(20) |
Dec
(8) |
2019 |
Jan
(28) |
Feb
(21) |
Mar
(13) |
Apr
(44) |
May
(44) |
Jun
(28) |
Jul
(51) |
Aug
(30) |
Sep
(7) |
Oct
(20) |
Nov
(8) |
Dec
(21) |
2020 |
Jan
(27) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Vlad S. <ser...@us...> - 2005-08-04 22:17:50
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31816/nsd Modified Files: log.c nsd.h Log Message: see ChangeLog Index: log.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/log.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** log.c 4 Aug 2005 05:29:40 -0000 1.6 --- log.c 4 Aug 2005 22:17:41 -0000 1.7 *************** *** 203,207 **** Ns_InfoErrorLog(void) { ! return nsconf.log.file; } --- 203,207 ---- Ns_InfoErrorLog(void) { ! return (char*)file; } *************** *** 227,235 **** Ns_LogRoll(void) { ! if (nsconf.log.file != NULL) { ! if (access(nsconf.log.file, F_OK) == 0) { ! Ns_RollFile(nsconf.log.file, nsconf.log.maxback); } ! Ns_Log(Notice, "log: re-opening log file '%s'", nsconf.log.file); if (LogReOpen() != NS_OK) { return NS_ERROR; --- 227,235 ---- Ns_LogRoll(void) { ! if (file != NULL) { ! if (access(file, F_OK) == 0) { ! Ns_RollFile(file, maxback); } ! Ns_Log(Notice, "log: re-opening log file '%s'", file); if (LogReOpen() != NS_OK) { return NS_ERROR; *************** *** 416,422 **** if (LogReOpen() != NS_OK) { Ns_Fatal("log: failed to open server log '%s': '%s'", ! nsconf.log.file, strerror(errno)); } ! if (nsconf.log.flags & LOG_ROLL) { Ns_RegisterAtSignal((Ns_Callback *) Ns_LogRoll, NULL); } --- 416,422 ---- if (LogReOpen() != NS_OK) { Ns_Fatal("log: failed to open server log '%s': '%s'", ! file, strerror(errno)); } ! if (flags & LOG_ROLL) { Ns_RegisterAtSignal((Ns_Callback *) Ns_LogRoll, NULL); } *************** *** 668,672 **** severityStr = logConfig[severity].string; } else { ! if (severity > nsconf.log.maxlevel) { return 0; } --- 668,672 ---- severityStr = logConfig[severity].string; } else { ! if (severity > maxlevel) { return 0; } *************** *** 675,679 **** } Ns_DStringAppend(&cachePtr->buffer, LogTime(cachePtr, 0, &usec)); ! if (nsconf.log.flags & LOG_USEC) { Ns_DStringTrunc(&cachePtr->buffer, cachePtr->buffer.length-1); Ns_DStringPrintf(&cachePtr->buffer, ".%ld]", usec); --- 675,679 ---- } Ns_DStringAppend(&cachePtr->buffer, LogTime(cachePtr, 0, &usec)); ! if (flags & LOG_USEC) { Ns_DStringTrunc(&cachePtr->buffer, cachePtr->buffer.length-1); Ns_DStringPrintf(&cachePtr->buffer, ".%ld]", usec); *************** *** 681,685 **** Ns_DStringPrintf(&cachePtr->buffer, "[%d.%lu][%s] %s: ", Ns_InfoPid(), (unsigned long) Ns_ThreadId(), Ns_ThreadGetName(), severityStr); ! if (nsconf.log.flags & LOG_EXPAND) { Ns_DStringAppend(&cachePtr->buffer, "\n "); } --- 681,685 ---- Ns_DStringPrintf(&cachePtr->buffer, "[%d.%lu][%s] %s: ", Ns_InfoPid(), (unsigned long) Ns_ThreadId(), Ns_ThreadGetName(), severityStr); ! if (flags & LOG_EXPAND) { Ns_DStringAppend(&cachePtr->buffer, "\n "); } *************** *** 709,713 **** { Ns_DStringNAppend(&cachePtr->buffer, "\n", 1); ! if (nsconf.log.flags & LOG_EXPAND) { Ns_DStringNAppend(&cachePtr->buffer, "\n", 1); } --- 709,713 ---- { Ns_DStringNAppend(&cachePtr->buffer, "\n", 1); ! if (flags & LOG_EXPAND) { Ns_DStringNAppend(&cachePtr->buffer, "\n", 1); } *************** *** 777,784 **** status = NS_OK; ! fd = open(nsconf.log.file, O_WRONLY|O_APPEND|O_CREAT, 0644); if (fd < 0) { Ns_Log(Error, "log: failed to re-open log file '%s': '%s'", ! nsconf.log.file, strerror(errno)); status = NS_ERROR; } else { --- 777,784 ---- status = NS_OK; ! fd = open(file, O_WRONLY|O_APPEND|O_CREAT, 0644); if (fd < 0) { Ns_Log(Error, "log: failed to re-open log file '%s': '%s'", ! file, strerror(errno)); status = NS_ERROR; } else { *************** *** 789,793 **** if (fd != STDERR_FILENO && dup2(fd, STDERR_FILENO) == -1) { fprintf(stdout, "dup2(%s, STDERR_FILENO) failed: %s\n", ! nsconf.log.file, strerror(errno)); status = NS_ERROR; } --- 789,793 ---- if (fd != STDERR_FILENO && dup2(fd, STDERR_FILENO) == -1) { fprintf(stdout, "dup2(%s, STDERR_FILENO) failed: %s\n", ! file, strerror(errno)); status = NS_ERROR; } Index: nsd.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsd.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** nsd.h 4 Aug 2005 05:29:40 -0000 1.31 --- nsd.h 4 Aug 2005 22:17:41 -0000 1.32 *************** *** 184,196 **** struct { - char *file; - int flags; - int maxlevel; - int maxback; - int maxbuffer; - int flushint; - } log; - - struct { int maxelapsed; } sched; --- 184,187 ---- |
From: Vlad S. <ser...@us...> - 2005-08-04 22:17:50
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31816 Modified Files: ChangeLog Log Message: see ChangeLog Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.186 retrieving revision 1.187 diff -C2 -d -r1.186 -r1.187 *** ChangeLog 4 Aug 2005 21:54:26 -0000 1.186 --- ChangeLog 4 Aug 2005 22:17:41 -0000 1.187 *************** *** 1,4 **** --- 1,8 ---- 2005-08-04 Vlad Seryakov <ser...@us...> + nsd/log.c: + nsd.nsd.h: Finished log localization by removing usage of the + global nsconf.log structure. + include/ns.h: nsd/set.c: |
From: Vlad S. <ser...@us...> - 2005-08-04 21:58:43
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27007/nsd Modified Files: tclset.c Log Message: Tcl API changed back for non-default functions to check number of arguments Index: tclset.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclset.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tclset.c 4 Aug 2005 21:54:26 -0000 1.6 --- tclset.c 4 Aug 2005 21:58:34 -0000 1.7 *************** *** 395,412 **** break; - case SFindIdx: - case SIFindIdx: case SGetIdx: case SIGetIdx: - case SDelkeyIdx: - case SIDelkeyIdx: - case SUniqueIdx: - case SIUniqueIdx: - /* - * These commands require a set and string key. - */ - if (objc < 4) { ! Tcl_WrongNumArgs(interp, 2, objv, "setId key"); return TCL_ERROR; } --- 395,402 ---- break; case SGetIdx: case SIGetIdx: if (objc < 4) { ! Tcl_WrongNumArgs(interp, 2, objv, "setId key ?dflt?"); return TCL_ERROR; } *************** *** 421,425 **** Tcl_SetResult(interp, Ns_SetIGetValue(set, key, def), TCL_VOLATILE); break; ! case SIFindIdx: objPtr = Tcl_NewIntObj(Ns_SetIFind(set, key)); --- 411,433 ---- Tcl_SetResult(interp, Ns_SetIGetValue(set, key, def), TCL_VOLATILE); break; ! } ! break; ! ! case SFindIdx: ! case SIFindIdx: ! case SDelkeyIdx: ! case SIDelkeyIdx: ! case SUniqueIdx: ! case SIUniqueIdx: ! /* ! * These commands require a set and string key. ! */ ! ! if (objc != 4) { ! Tcl_WrongNumArgs(interp, 2, objv, "setId key"); ! return TCL_ERROR; ! } ! key = Tcl_GetString(objv[3]); ! switch (opt) { case SIFindIdx: objPtr = Tcl_NewIntObj(Ns_SetIFind(set, key)); |
From: Vlad S. <ser...@us...> - 2005-08-04 21:54:35
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25537 Modified Files: ChangeLog Log Message: see ChangeLog Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.185 retrieving revision 1.186 diff -C2 -d -r1.185 -r1.186 *** ChangeLog 4 Aug 2005 05:29:40 -0000 1.185 --- ChangeLog 4 Aug 2005 21:54:26 -0000 1.186 *************** *** 1,2 **** --- 1,9 ---- + 2005-08-04 Vlad Seryakov <ser...@us...> + + include/ns.h: + nsd/set.c: + nsd/tclset.c: Added Ns_SetGetValue|Ns_SetIGetValue wrappers which + handle defaults + 2005-08-03 Stephen Deasey <sd...@us...> |
From: Vlad S. <ser...@us...> - 2005-08-04 21:54:35
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25537/nsd Modified Files: set.c tclset.c Log Message: see ChangeLog Index: set.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/set.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** set.c 23 Jun 2005 14:20:04 -0000 1.4 --- set.c 4 Aug 2005 21:54:26 -0000 1.5 *************** *** 415,418 **** --- 415,466 ---- } + /* + *---------------------------------------------------------------------- + * + * Ns_SetGetValue -- + * + * Return the value associated with a key, case sensitive. + * If no value foud, return provided default value + * + * Results: + * A value or NULL if key not found or default is NULL + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + char *Ns_SetGetValue(Ns_Set *set, CONST char *key, CONST char *def) + { + char *value = Ns_SetGet(set, key); + if (value == NULL) value = (char*)def; + return value; + } + + /* + *---------------------------------------------------------------------- + * + * Ns_SetIGetValue -- + * + * Return the value associated with a key, case insensitive. + * If no value found, return provided default value + * + * Results: + * A value or NULL if key not found or default is NULL + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + char *Ns_SetIGetValue(Ns_Set *set, CONST char *key, CONST char *def) + { + char *value = Ns_SetIGet(set, key); + if (value == NULL) value = (char*)def; + return value; + } + /* Index: tclset.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclset.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tclset.c 12 Jul 2005 07:31:39 -0000 1.5 --- tclset.c 4 Aug 2005 21:54:26 -0000 1.6 *************** *** 200,204 **** Ns_Set *set, *set2Ptr, **sets; int locked, i, flags; ! char *key, *val, *name, *split; Tcl_DString ds; Tcl_HashTable *tablePtr; --- 200,204 ---- Ns_Set *set, *set2Ptr, **sets; int locked, i, flags; ! char *key, *val, *def, *name, *split; Tcl_DString ds; Tcl_HashTable *tablePtr; *************** *** 407,416 **** */ ! if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "setId key"); return TCL_ERROR; } key = Tcl_GetString(objv[3]); switch (opt) { case SFindIdx: objPtr = Tcl_NewIntObj(Ns_SetFind(set, key)); --- 407,430 ---- */ ! if (objc < 4) { Tcl_WrongNumArgs(interp, 2, objv, "setId key"); return TCL_ERROR; } key = Tcl_GetString(objv[3]); + def = (objc > 4 ? Tcl_GetString(objv[4]) : NULL); switch (opt) { + case SGetIdx: + Tcl_SetResult(interp, Ns_SetGetValue(set, key, def), TCL_VOLATILE); + break; + + case SIGetIdx: + Tcl_SetResult(interp, Ns_SetIGetValue(set, key, def), TCL_VOLATILE); + break; + + case SIFindIdx: + objPtr = Tcl_NewIntObj(Ns_SetIFind(set, key)); + Tcl_SetObjResult(interp, objPtr); + break; + case SFindIdx: objPtr = Tcl_NewIntObj(Ns_SetFind(set, key)); *************** *** 418,425 **** break; ! case SGetIdx: ! Tcl_SetResult(interp, Ns_SetGet(set, key), TCL_VOLATILE); break; ! case SDeleteIdx: case SDelkeyIdx: --- 432,440 ---- break; ! case SIDeleteIdx: ! case SIDelkeyIdx: ! Ns_SetIDeleteKey(set, key); break; ! case SDeleteIdx: case SDelkeyIdx: *************** *** 432,449 **** break; - case SIFindIdx: - objPtr = Tcl_NewIntObj(Ns_SetIFind(set, key)); - Tcl_SetObjResult(interp, objPtr); - break; - - case SIGetIdx: - Tcl_SetResult(interp, Ns_SetIGet(set, key), TCL_VOLATILE); - break; - - case SIDeleteIdx: - case SIDelkeyIdx: - Ns_SetIDeleteKey(set, key); - break; - case SIUniqueIdx: objPtr = Tcl_NewIntObj(Ns_SetIUnique(set, key)); --- 447,450 ---- |
From: Vlad S. <ser...@us...> - 2005-08-04 21:54:35
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25537/include Modified Files: ns.h Log Message: see ChangeLog Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** ns.h 4 Aug 2005 04:52:12 -0000 1.46 --- ns.h 4 Aug 2005 21:54:26 -0000 1.47 *************** *** 1261,1264 **** --- 1261,1267 ---- NS_EXTERN void Ns_SetMove(Ns_Set *to, Ns_Set *from); NS_EXTERN void Ns_SetPrint(Ns_Set *set); + NS_EXTERN char *Ns_SetGetValue(Ns_Set *set, CONST char *key, CONST char *def); + NS_EXTERN char *Ns_SetIGetValue(Ns_Set *set, CONST char *key, CONST char *def); + /* * see macros above for: |
From: Stephen D. <sd...@us...> - 2005-08-04 05:29:52
|
Update of /cvsroot/naviserver/naviserver/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30326/tests Modified Files: all.tcl Added Files: ns_log.test Log Message: * nsd/nsd.h: * nsd/nsconf.h: * nsd/nsconf.c: * nsd/log.c: Use efficient table lookups to convert from severity strings to severity levels and back again. Localize global log configuration into log.c. * tests/ns_log.test: Add some simple tests for the ns_log and ns_logctl commands. * tests/all.tcl: tcltest does not actually get confused by log messages... Index: all.tcl =================================================================== RCS file: /cvsroot/naviserver/naviserver/tests/all.tcl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** all.tcl 3 Apr 2005 06:38:01 -0000 1.2 --- all.tcl 4 Aug 2005 05:29:41 -0000 1.3 *************** *** 44,49 **** eval configure $argv -singleproc true -testdir [file dirname [info script]] - # Output on stderr confuses tcltest - ns_logctl hold runAllTests --- 44,47 ---- --- NEW FILE: ns_log.test --- # # $Header: /cvsroot/naviserver/naviserver/tests/ns_log.test,v 1.1 2005/08/04 05:29:41 sdeasey Exp $ # package require tcltest 2.2 namespace import -force ::tcltest::* eval ::tcltest::configure $argv test ns_log-1.1 {basic syntax} -body { ns_log } -returnCodes error -result {wrong # args: should be "ns_log severity string ?string ...?"} test ns_log-1.2 {basic syntax} -body { ns_log ? ? } -returnCodes error -result {unknown severity: "?": should be notice, warning, error, fatal, bug, debug, dev or integer value} test ns_log-2.1 {basic syntax} -body { ns_logctl } -returnCodes error -result {wrong # args: should be "ns_logctl option ?arg?"} test ns_log-2.2 {basic syntax} -body { ns_logctl ? } -returnCodes error -result {bad option "?": must be hold, count, get, peek, flush, release, or truncate} ns_logctl hold ns_logctl trunc test ns_log-3.1 {severity} -body { ns_log notice test ns_logctl get } -match glob -result "* Notice: test\n" test ns_log-3.2 {severity} -body { ns_log warning test ns_logctl get } -match glob -result "* Warning: test\n" test ns_log-3.3 {severity} -body { ns_log error test ns_logctl get } -match glob -result "* Error: test\n" test ns_log-3.4 {severity} -body { ns_log fatal test ns_logctl get } -match glob -result "* Fatal: test\n" test ns_log-3.5 {severity} -body { ns_log bug test ns_logctl get } -match glob -result "* Bug: test\n" test ns_log-3.6 {severity} -constraints knownBug -body { ns_log debug test ns_logctl get } -match glob -result "* Debug: test\n" test ns_log-3.7 {severity} -constraints knownBug -body { ns_log dev test ns_logctl get } -match glob -result "* Dev: test\n" test ns_log-4.1 {multiple args} -body { ns_log notice one two ns_logctl get } -match glob -result "* Notice: one two\n" test ns_log-4.2 {multiple args} -body { ns_log notice one two three ns_logctl get } -match glob -result "* Notice: one two three\n" test ns_log-5.1 {buffering} -body { ns_log notice one ns_log notice two ns_logctl get } -match glob -result "* Notice: one\n* Notice: two\n" test ns_log-5.2 {count buffered log entries} -body { ns_log notice one ns_log notice two set n [ns_logctl count] ns_logctl trunc set n } -result 2 test ns_log-5.3 {peek} -body { ns_log notice test set equal [string equal [ns_logctl peek] [ns_logctl peek]] ns_logctl trunc set equal } -result 1 test ns_log-5.4 {trunc} -body { ns_log notice test ns_logctl trunc ns_logctl get } -result {} test ns_log-5.5 {trunc} -body { ns_log notice test ns_logctl trunc [expr [string length [ns_logctl peek]] - 2] ns_logctl get } -match glob -result {* Notice: tes} test ns_log-5.6 {get} -body { ns_log notice test ns_logctl get ns_logctl get } -result {} test ns_log-5.7 {get} -body { ns_log notice test set n [ns_logctl count] ns_logctl get lappend n [ns_logctl count] } -result {1 0} test ns_log-5.8 {flush} -body { ns_log notice test ns_logctl flush ns_logctl get } -result {} test ns_log-5.9 {flush} -body { ns_log notice test set n [ns_logctl count] ns_logctl flush lappend n [ns_logctl count] } -result {1 0} ns_logctl trunc ns_logctl release cleanupTests |
From: Stephen D. <sd...@us...> - 2005-08-04 05:29:52
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30326 Modified Files: ChangeLog Log Message: * nsd/nsd.h: * nsd/nsconf.h: * nsd/nsconf.c: * nsd/log.c: Use efficient table lookups to convert from severity strings to severity levels and back again. Localize global log configuration into log.c. * tests/ns_log.test: Add some simple tests for the ns_log and ns_logctl commands. * tests/all.tcl: tcltest does not actually get confused by log messages... Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** ChangeLog 4 Aug 2005 04:52:11 -0000 1.184 --- ChangeLog 4 Aug 2005 05:29:40 -0000 1.185 *************** *** 1,4 **** --- 1,15 ---- 2005-08-03 Stephen Deasey <sd...@us...> + * nsd/nsd.h: + * nsd/nsconf.h: + * nsd/nsconf.c: + * nsd/log.c: Use efficient table lookups to convert from severity + strings to severity levels and back again. Localize global log + configuration into log.c. + * tests/ns_log.test: Add some simple tests for the ns_log and + ns_logctl commands. + * tests/all.tcl: tcltest does not actually get confused by log + messages... + * include/ns.h: * nsd/nsd.h: |
From: Stephen D. <sd...@us...> - 2005-08-04 05:29:52
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30326/nsd Modified Files: log.c nsconf.c nsconf.h nsd.h Log Message: * nsd/nsd.h: * nsd/nsconf.h: * nsd/nsconf.c: * nsd/log.c: Use efficient table lookups to convert from severity strings to severity levels and back again. Localize global log configuration into log.c. * tests/ns_log.test: Add some simple tests for the ns_log and ns_logctl commands. * tests/all.tcl: tcltest does not actually get confused by log messages... Index: nsconf.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsconf.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nsconf.h 6 Jul 2005 07:12:18 -0000 1.2 --- nsconf.h 4 Aug 2005 05:29:40 -0000 1.3 *************** *** 40,53 **** - #define LOG_EXPANDED_BOOL NS_FALSE - #define LOG_DEBUG_BOOL NS_FALSE #define LOG_NOTICE_BOOL NS_TRUE #define LOG_DEV_BOOL NS_FALSE #define LOG_ROLL_BOOL NS_TRUE #define LOG_USEC_BOOL NS_FALSE ! #define LOG_MAXBUFFER_INT 10 ! #define LOG_MAXLEVEL_INT INT_MAX #define LOG_MAXBACK_INT 10 ! #define LOG_FLUSHINT_INT 10 #define THREAD_STACKSIZE_INT (64*1024) --- 40,53 ---- #define LOG_NOTICE_BOOL NS_TRUE + #define LOG_DEBUG_BOOL NS_FALSE #define LOG_DEV_BOOL NS_FALSE #define LOG_ROLL_BOOL NS_TRUE #define LOG_USEC_BOOL NS_FALSE ! #define LOG_EXPANDED_BOOL NS_FALSE #define LOG_MAXBACK_INT 10 ! #define LOG_MAXLEVEL_INT INT_MAX ! #define LOG_MAXBUFFER_INT 10 ! #define LOG_FILE_STRING "server.log" #define THREAD_STACKSIZE_INT (64*1024) Index: nsconf.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsconf.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** nsconf.c 6 Jul 2005 07:12:18 -0000 1.4 --- nsconf.c 4 Aug 2005 05:29:40 -0000 1.5 *************** *** 171,205 **** * log.c */ ! ! if (GetBool("logusec", LOG_USEC_BOOL)) { ! nsconf.log.flags |= LOG_USEC; ! } ! if (GetBool("logroll", LOG_ROLL_BOOL)) { ! nsconf.log.flags |= LOG_ROLL; ! } ! if (GetBool("logexpanded", LOG_EXPANDED_BOOL)) { ! nsconf.log.flags |= LOG_EXPAND; ! } ! if (GetBool("debug", LOG_DEBUG_BOOL)) { ! nsconf.log.flags |= LOG_DEBUG; ! } ! if (GetBool("logdev", LOG_DEV_BOOL)) { ! nsconf.log.flags |= LOG_DEV; ! } ! if (!GetBool("lognotice", LOG_NOTICE_BOOL)) { ! nsconf.log.flags |= LOG_NONOTICE; ! } ! nsconf.log.maxback = GetInt("logmaxbackup", LOG_MAXBACK_INT); ! nsconf.log.maxlevel = GetInt("logmaxlevel", LOG_MAXLEVEL_INT); ! nsconf.log.maxbuffer = GetInt("logmaxbuffer", LOG_MAXBUFFER_INT); ! nsconf.log.flushint = GetInt("logflushinterval", LOG_FLUSHINT_INT); ! nsconf.log.file = Ns_ConfigGetValue(NS_CONFIG_PARAMETERS, "serverlog"); ! if (nsconf.log.file == NULL) { ! nsconf.log.file = "server.log"; ! } ! if (Ns_PathIsAbsolute(nsconf.log.file) == NS_FALSE) { ! Ns_HomePath(&ds, "log", nsconf.log.file, NULL); ! nsconf.log.file = Ns_DStringExport(&ds); ! } /* --- 171,176 ---- * log.c */ ! ! NsConfigLog(); /* Index: nsd.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsd.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** nsd.h 4 Aug 2005 04:52:12 -0000 1.30 --- nsd.h 4 Aug 2005 05:29:40 -0000 1.31 *************** *** 124,134 **** #define ADP_RETURN 4 - #define LOG_ROLL 1 - #define LOG_EXPAND 2 - #define LOG_DEBUG 4 - #define LOG_DEV 8 - #define LOG_NONOTICE 16 - #define LOG_USEC 32 - #define NSD_STRIP_WWW 1 #define NSD_STRIP_PORT 2 --- 124,127 ---- *************** *** 837,848 **** /* - * Global parameters. - */ - - #define NsParamString(key, def) Ns_ConfigString(NS_CONFIG_PARAMETERS, (key), (def)) - #define NsParamBool(key, def) Ns_ConfigBool(NS_CONFIG_PARAMETERS, (key), (def)) - #define NsParamInt(key, def) Ns_ConfigInt(NS_CONFIG_PARAMETERS, (key), (def)) - - /* * Libnsd initialization routines. */ --- 830,833 ---- *************** *** 865,868 **** --- 850,862 ---- extern void NsInitRequests(void); + /* + * Configuration routines. + */ + + extern void NsConfigLog(void); + #define NsParamString(key, def) Ns_ConfigString(NS_CONFIG_PARAMETERS, (key), (def)) + #define NsParamBool(key, def) Ns_ConfigBool(NS_CONFIG_PARAMETERS, (key), (def)) + #define NsParamInt(key, def) Ns_ConfigInt(NS_CONFIG_PARAMETERS, (key), (def)) + extern int NsQueueConn(Sock *sockPtr, Ns_Time *nowPtr); extern void NsMapPool(ConnPool *poolPtr, char *map); Index: log.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/log.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** log.c 2 Aug 2005 03:51:22 -0000 1.5 --- log.c 4 Aug 2005 05:29:40 -0000 1.6 *************** *** 39,42 **** --- 39,51 ---- NS_RCSID("@(#) $Header$"); + + /* + * The following define available flags bits. + */ + + #define LOG_ROLL 0x01 + #define LOG_EXPAND 0x02 + #define LOG_USEC 0x04 + /* * The following struct maintains per-thread *************** *** 76,79 **** --- 85,112 ---- static Ns_LogProc *logProcPtr; static Ns_LogFlushProc *flushProcPtr; + static CONST char *file; + static int flags; + static int maxback; + static int maxlevel; + static int maxbuffer; + + /* + * Keep the following in sync with the + * Ns_LogSeverity enum. + */ + + static struct { + char *string; + int enabled; + } logConfig[] = { + {"Notice", NS_TRUE}, + {"Warning", NS_TRUE}, + {"Error", NS_TRUE}, + {"Fatal", NS_TRUE}, + {"Bug", NS_TRUE}, + {"Debug", NS_TRUE}, + {"Dev", NS_TRUE} + }; + *************** *** 106,109 **** --- 139,190 ---- *---------------------------------------------------------------------- * + * NsConfigLog -- + * + * Config the logging interface. + * + * Results: + * None. + * + * Side effects: + * Depends on config file. + * + *---------------------------------------------------------------------- + */ + + void + NsConfigLog(void) + { + Ns_DString ds; + + logConfig[Notice].enabled = NsParamBool("lognotice", LOG_NOTICE_BOOL); + logConfig[Debug].enabled = NsParamBool("logdebug", LOG_DEBUG_BOOL); + logConfig[Dev].enabled = NsParamBool("logdev", LOG_DEV_BOOL); + + if (NsParamBool( "logroll", LOG_ROLL_BOOL)) { + flags |= LOG_ROLL; + } + if (NsParamBool("logusec", LOG_USEC_BOOL)) { + flags |= LOG_USEC; + } + if (NsParamBool("logexpanded", LOG_EXPANDED_BOOL)) { + flags |= LOG_EXPAND; + } + + maxback = NsParamInt("logmaxbackup", LOG_MAXBACK_INT); + maxlevel = NsParamInt("logmaxlevel", LOG_MAXLEVEL_INT); + maxbuffer = NsParamInt("logmaxbuffer", LOG_MAXBUFFER_INT); + + file = NsParamString("serverlog", LOG_FILE_STRING); + if (!Ns_PathIsAbsolute(file)) { + Ns_DStringInit(&ds); + Ns_HomePath(&ds, "log", file, NULL); + file = Ns_DStringExport(&ds); + } + } + + + /* + *---------------------------------------------------------------------- + * * Ns_InfoErrorLog -- * *************** *** 468,476 **** NsTclLogObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - LogCache *cachePtr; Ns_LogSeverity severity; - char *severitystr; - int i; Ns_DString ds; if (objc < 3) { --- 549,569 ---- NsTclLogObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Ns_LogSeverity severity; Ns_DString ds; + int i; + + struct { + char *string; + Ns_LogSeverity severity; + } severityTable[] = { + {"notice", Notice}, {"Notice", Notice}, + {"warning", Warning}, {"Warning", Warning}, + {"error", Error}, {"Error", Error}, + {"fatal", Fatal}, {"Fatal", Fatal}, + {"bug", Bug}, {"Bug", Bug}, + {"debug", Debug}, {"Debug", Debug}, + {"dev", Dev}, {"Dev", Dev}, + {NULL, 0} + }; if (objc < 3) { *************** *** 478,514 **** return TCL_ERROR; } ! cachePtr = LogGetCache(); ! severitystr = Tcl_GetString(objv[1]); ! if (STRIEQ(severitystr, "notice")) { ! severity = Notice; ! } else if (STRIEQ(severitystr, "warning")) { ! severity = Warning; ! } else if (STRIEQ(severitystr, "error")) { ! severity = Error; ! } else if (STRIEQ(severitystr, "fatal")) { ! severity = Fatal; ! } else if (STRIEQ(severitystr, "bug")) { ! severity = Bug; ! } else if (STRIEQ(severitystr, "debug")) { ! severity = Debug; } else if (Tcl_GetIntFromObj(NULL, objv[1], &i) == TCL_OK) { severity = i; } else { ! Tcl_AppendResult(interp, "unknown severity: \"", severitystr, "\": should be notice, warning, error, " ! "fatal, bug, debug or integer value", NULL); return TCL_ERROR; } ! Ns_DStringInit(&ds); ! ! for (i = 2; i < objc; ++i) { ! Ns_DStringVarAppend(&ds, Tcl_GetString(objv[i]), ! i < (objc-1) ? " " : NULL, NULL); } - Ns_Log(severity, "%s", ds.string); - Ns_DStringFree(&ds); - return TCL_OK; } --- 571,599 ---- return TCL_ERROR; } ! if (Tcl_GetIndexFromObjStruct(NULL, objv[1], severityTable, ! sizeof(severityTable[0]), "severity", ! TCL_EXACT, &i) == TCL_OK) { ! severity = severityTable[i].severity; } else if (Tcl_GetIntFromObj(NULL, objv[1], &i) == TCL_OK) { severity = i; } else { ! Tcl_AppendResult(interp, "unknown severity: \"", Tcl_GetString(objv[1]), "\": should be notice, warning, error, " ! "fatal, bug, debug, dev or integer value", NULL); return TCL_ERROR; } ! if (objc == 3) { ! Ns_Log(severity, "%s", Tcl_GetString(objv[2])); ! } else { ! Ns_DStringInit(&ds); ! for (i = 2; i < objc; ++i) { ! Ns_DStringVarAppend(&ds, Tcl_GetString(objv[i]), ! i < (objc-1) ? " " : NULL, NULL); ! } ! Ns_Log(severity, "%s", ds.string); ! Ns_DStringFree(&ds); } return TCL_OK; } *************** *** 577,619 **** long usec; ! switch (severity) { ! case Notice: ! if (nsconf.log.flags & LOG_NONOTICE) { ! return 0; ! } ! severityStr = "Notice"; ! break; ! ! case Warning: ! severityStr = "Warning"; ! break; ! ! case Error: ! severityStr = "Error"; ! break; ! ! case Fatal: ! severityStr = "Fatal"; ! break; ! ! case Bug: ! severityStr = "Bug"; ! break; ! ! case Debug: ! if (!(nsconf.log.flags & LOG_DEBUG)) { ! return 0; ! } ! severityStr = "Debug"; ! break; ! ! case Dev: ! if (!(nsconf.log.flags & LOG_DEV)) { return 0; } ! severityStr = "Dev"; ! break; ! ! default: if (severity > nsconf.log.maxlevel) { return 0; --- 662,671 ---- long usec; ! if (severity < (sizeof(logConfig) / sizeof(logConfig[0]))) { ! if (!logConfig[severity].enabled) { return 0; } ! severityStr = logConfig[severity].string; ! } else { if (severity > nsconf.log.maxlevel) { return 0; *************** *** 621,625 **** sprintf(buf, "Level%d", severity); severityStr = buf; - break; } Ns_DStringAppend(&cachePtr->buffer, LogTime(cachePtr, 0, &usec)); --- 673,676 ---- |
From: Stephen D. <sd...@us...> - 2005-08-04 04:52:21
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24682/nsd Modified Files: config.c nsd.h Log Message: * include/ns.h: * nsd/nsd.h: * nsd/config.c: Add config value wrappers which handle defaults and in the case of integer values, range checking. Index: config.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/config.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.c 22 Jul 2005 06:41:24 -0000 1.3 --- config.c 4 Aug 2005 04:52:12 -0000 1.4 *************** *** 40,43 **** --- 40,45 ---- #define ISSLASH(c) ((c) == '/' || (c) == '\\') + #define _MAX(x,y) ((x) > (y) ? (x) : (y)) + #define _MIN(x,y) ((x) > (y) ? (y) : (x)) /* *************** *** 50,53 **** --- 52,174 ---- static char *ConfigGet(CONST char *section, CONST char *key, int exact); + + + /* + *---------------------------------------------------------------------- + * + * Ns_ConfigString -- + * + * Return a config file value, or the default if not found. + * + * Results: + * Pointer to value string. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + CONST char * + Ns_ConfigString(CONST char *section, CONST char *key, CONST char *def) + { + CONST char *value; + + value = Ns_ConfigGetValue(section, key); + if (value == NULL) { + value = def; + } + return value; + } + + + /* + *---------------------------------------------------------------------- + * + * Ns_ConfigBool -- + * + * Return a boolean config file value, or the default if not + * found. + * + * Results: + * NS_TRUE or NS_FALSE. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + int + Ns_ConfigBool(CONST char *section, CONST char *key, int def) + { + int value; + + if (!Ns_ConfigGetBool(section, key, &value)) { + value = def ? NS_TRUE : NS_FALSE; + } + return value; + } + + + /* + *---------------------------------------------------------------------- + * + * Ns_ConfigInt -- + * + * Return an integer config file value, or the default if not + * found. + * + * Results: + * An integer. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + int + Ns_ConfigInt(CONST char *section, CONST char *key, int def) + { + int value; + + if (!Ns_ConfigGetInt(section, key, &value)) { + value = def; + } + return value; + } + + + /* + *---------------------------------------------------------------------- + * + * Ns_ConfigIntRange -- + * + * Return an integer config file value, or the default if not + * found. The returned value will be between the given min and max. + * + * Results: + * An integer. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + int + Ns_ConfigIntRange(CONST char *section, CONST char *key, int def, + int min, int max) + { + int value; + + value = Ns_ConfigInt(section, key, def); + value = _MAX(value, min); + value = _MIN(value, max); + + return value; + } + /* Index: nsd.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsd.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** nsd.h 1 Aug 2005 16:22:25 -0000 1.29 --- nsd.h 4 Aug 2005 04:52:12 -0000 1.30 *************** *** 837,840 **** --- 837,848 ---- /* + * Global parameters. + */ + + #define NsParamString(key, def) Ns_ConfigString(NS_CONFIG_PARAMETERS, (key), (def)) + #define NsParamBool(key, def) Ns_ConfigBool(NS_CONFIG_PARAMETERS, (key), (def)) + #define NsParamInt(key, def) Ns_ConfigInt(NS_CONFIG_PARAMETERS, (key), (def)) + + /* * Libnsd initialization routines. */ |
From: Stephen D. <sd...@us...> - 2005-08-04 04:52:20
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24682/include Modified Files: ns.h Log Message: * include/ns.h: * nsd/nsd.h: * nsd/config.c: Add config value wrappers which handle defaults and in the case of integer values, range checking. Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ns.h 2 Aug 2005 03:51:22 -0000 1.45 --- ns.h 4 Aug 2005 04:52:12 -0000 1.46 *************** *** 629,646 **** */ NS_EXTERN char * ! Ns_ConfigGetValue(CONST char *section, CONST char *key); NS_EXTERN char * ! Ns_ConfigGetValueExact(CONST char *section, CONST char *key); NS_EXTERN int ! Ns_ConfigGetInt(CONST char *section, CONST char *key, int *valuePtr); NS_EXTERN int ! Ns_ConfigGetInt64(CONST char *section, CONST char *key, ns_int64 *valuePtr); NS_EXTERN int ! Ns_ConfigGetBool(CONST char *section, CONST char *key, int *valuePtr); NS_EXTERN char * --- 629,668 ---- */ + NS_EXTERN CONST char * + Ns_ConfigString(CONST char *section, CONST char *key, CONST char *def) + NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2); + + NS_EXTERN int + Ns_ConfigBool(CONST char *section, CONST char *key, int def) + NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2); + + NS_EXTERN int + Ns_ConfigInt(CONST char *section, CONST char *key, int def) + NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2); + + NS_EXTERN int + Ns_ConfigIntRange(CONST char *section, CONST char *key, int def, + int min, int max) + NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2); + NS_EXTERN char * ! Ns_ConfigGetValue(CONST char *section, CONST char *key) ! NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2); NS_EXTERN char * ! Ns_ConfigGetValueExact(CONST char *section, CONST char *key) ! NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2); NS_EXTERN int ! Ns_ConfigGetInt(CONST char *section, CONST char *key, int *valuePtr) ! NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2) NS_GNUC_NONNULL(3); NS_EXTERN int ! Ns_ConfigGetInt64(CONST char *section, CONST char *key, ns_int64 *valuePtr) ! NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2) NS_GNUC_NONNULL(3); NS_EXTERN int ! Ns_ConfigGetBool(CONST char *section, CONST char *key, int *valuePtr) ! NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2) NS_GNUC_NONNULL(3); NS_EXTERN char * |
From: Stephen D. <sd...@us...> - 2005-08-04 04:52:20
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24682 Modified Files: ChangeLog Log Message: * include/ns.h: * nsd/nsd.h: * nsd/config.c: Add config value wrappers which handle defaults and in the case of integer values, range checking. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -d -r1.183 -r1.184 *** ChangeLog 2 Aug 2005 04:59:44 -0000 1.183 --- ChangeLog 4 Aug 2005 04:52:11 -0000 1.184 *************** *** 1,2 **** --- 1,9 ---- + 2005-08-03 Stephen Deasey <sd...@us...> + + * include/ns.h: + * nsd/nsd.h: + * nsd/config.c: Add config value wrappers which handle defaults + and in the case of integer values, range checking. + 2005-08-01 Stephen Deasey <sd...@us...> |
From: Stephen D. <sd...@us...> - 2005-08-02 05:00:02
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15682/nsd Modified Files: driver.c Log Message: * nsd/driver.c: Log a warning when no drivers are configured to listen (BUG #1231853). Driver errors during startup continue to be a non-fatal error. Index: driver.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/driver.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** driver.c 12 Jul 2005 16:00:54 -0000 1.19 --- driver.c 2 Aug 2005 04:59:54 -0000 1.20 *************** *** 481,484 **** --- 481,486 ---- } Ns_ThreadCreate(DriverThread, NULL, 0, &driverThread); + } else { + Ns_Log(Warning, "no communication drivers configured"); } } |
From: Stephen D. <sd...@us...> - 2005-08-02 05:00:02
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15682 Modified Files: ChangeLog Log Message: * nsd/driver.c: Log a warning when no drivers are configured to listen (BUG #1231853). Driver errors during startup continue to be a non-fatal error. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -d -r1.182 -r1.183 *** ChangeLog 2 Aug 2005 03:51:22 -0000 1.182 --- ChangeLog 2 Aug 2005 04:59:44 -0000 1.183 *************** *** 1,4 **** --- 1,8 ---- 2005-08-01 Stephen Deasey <sd...@us...> + * nsd/driver.c: Log a warning when no drivers are configured to + listen (BUG #1231853). Driver errors during startup continue to + be a non-fatal error. + * include/ns.h: * nsd/log.c: Make Tcl send panic messages to the server log. Add |
From: Stephen D. <sd...@us...> - 2005-08-02 03:51:32
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7362/nsd Modified Files: log.c unix.c Log Message: * include/ns.h: * nsd/log.c: Make Tcl send panic messages to the server log. Add some CONST declarations and GCC attributes. * nsd/unix.c: Call Tcl Panic directly from fatal signal handler. Remove unneeded call to pthread_kill_other_threads_np. Index: unix.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/unix.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** unix.c 11 Jun 2005 18:40:32 -0000 1.9 --- unix.c 2 Aug 2005 03:51:23 -0000 1.10 *************** *** 46,50 **** static int Pipe(int *fds, int sockpair); ! static void FatalSignalHandler(int signal); /* --- 46,50 ---- static int Pipe(int *fds, int sockpair); ! static void Abort(int signal); /* *************** *** 104,112 **** */ ! ns_signal(SIGILL, FatalSignalHandler); ! ns_signal(SIGTRAP, FatalSignalHandler); ! ns_signal(SIGBUS, FatalSignalHandler); ! ns_signal(SIGSEGV, FatalSignalHandler); ! ns_signal(SIGFPE, FatalSignalHandler); } --- 104,112 ---- */ ! ns_signal(SIGILL, Abort); ! ns_signal(SIGTRAP, Abort); ! ns_signal(SIGBUS, Abort); ! ns_signal(SIGSEGV, Abort); ! ns_signal(SIGFPE, Abort); } *************** *** 625,629 **** *---------------------------------------------------------------------- * ! * FatalSignalHandler -- * * Ensure that we drop core on fatal signals like SIGBUS and --- 625,629 ---- *---------------------------------------------------------------------- * ! * Abort -- * * Ensure that we drop core on fatal signals like SIGBUS and *************** *** 640,655 **** static void ! FatalSignalHandler(int signal) { ! #ifdef __linux ! /* ! * LinuxThreads thread manager needs to kill all child threads ! * on fatal signals, else they get left behind as dead threads. ! * As of glibc 2.3 with NPTL, this should be a no-op. ! */ ! pthread_kill_other_threads_np(); ! #endif ! ! Ns_Log(Fatal, "received fatal signal %d", signal); ! abort(); } --- 640,645 ---- static void ! Abort(int signal) { ! Tcl_Panic("received fatal signal %d", signal); } Index: log.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/log.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** log.c 2 Aug 2005 00:29:20 -0000 1.4 --- log.c 2 Aug 2005 03:51:22 -0000 1.5 *************** *** 58,62 **** */ ! static void Log(Ns_LogSeverity severity, char *fmt, va_list ap); static int LogStart(LogCache *cachePtr, Ns_LogSeverity severity); static void LogEnd(LogCache *cachePtr); --- 58,62 ---- */ ! static void Log(Ns_LogSeverity severity, CONST char *fmt, va_list ap); static int LogStart(LogCache *cachePtr, Ns_LogSeverity severity); static void LogEnd(LogCache *cachePtr); *************** *** 66,69 **** --- 66,70 ---- static LogCache *LogGetCache(void); static Ns_TlsCleanup LogFreeCache; + static Tcl_PanicProc Panic; /* *************** *** 98,101 **** --- 99,103 ---- Ns_MutexSetName(&lock, "ns:log"); Ns_TlsAlloc(&tls, LogFreeCache); + Tcl_SetPanicProc(Panic); } *************** *** 174,178 **** void ! Ns_Log(Ns_LogSeverity severity, char *fmt, ...) { va_list ap; --- 176,180 ---- void ! Ns_Log(Ns_LogSeverity severity, CONST char *fmt, ...) { va_list ap; *************** *** 196,200 **** * * Side effects: ! * WILL CAUSE THE SERVER TO EXIT! * *---------------------------------------------------------------------- --- 198,202 ---- * * Side effects: ! * The process will exit. * *---------------------------------------------------------------------- *************** *** 202,206 **** void ! Ns_Fatal(char *fmt, ...) { va_list ap; --- 204,208 ---- void ! Ns_Fatal(CONST char *fmt, ...) { va_list ap; *************** *** 532,536 **** static void ! Log(Ns_LogSeverity severity, char *fmt, va_list ap) { LogCache *cachePtr; --- 534,538 ---- static void ! Log(Ns_LogSeverity severity, CONST char *fmt, va_list ap) { LogCache *cachePtr; *************** *** 888,889 **** --- 890,921 ---- ns_free(cachePtr); } + + + /* + *---------------------------------------------------------------------- + * + * Panic -- + * + * Tcl_PanicProc callback which sends a message to the server log + * with severity level Fatal, and then kills the process immediately. + * + * Results: + * None. + * + * Side effects: + * The process dies, possibly entering the debugger. + * + *---------------------------------------------------------------------- + */ + + static void + Panic(CONST char *fmt, ...) + { + va_list ap; + + va_start(ap, fmt); + Log(Fatal, fmt, ap); + va_end(ap); + + abort(); + } |
From: Stephen D. <sd...@us...> - 2005-08-02 03:51:30
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7362/include Modified Files: ns.h Log Message: * include/ns.h: * nsd/log.c: Make Tcl send panic messages to the server log. Add some CONST declarations and GCC attributes. * nsd/unix.c: Call Tcl Panic directly from fatal signal handler. Remove unneeded call to pthread_kill_other_threads_np. Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** ns.h 2 Aug 2005 01:45:32 -0000 1.44 --- ns.h 2 Aug 2005 03:51:22 -0000 1.45 *************** *** 323,328 **** typedef void (Ns_AdpParserProc)(Ns_DString *outPtr, char *page); typedef int (Ns_UserAuthorizeProc) (char *user, char *passwd); ! typedef int (Ns_LogFlushProc) (char *msg, size_t len); ! typedef int (Ns_LogProc) (Ns_DString *dsPtr, Ns_LogSeverity severity, char *fmt, va_list ap); struct Ns_ObjvSpec; typedef int (Ns_ObjvProc) (struct Ns_ObjvSpec *spec, Tcl_Interp *interp, --- 323,328 ---- typedef void (Ns_AdpParserProc)(Ns_DString *outPtr, char *page); typedef int (Ns_UserAuthorizeProc) (char *user, char *passwd); ! typedef int (Ns_LogFlushProc) (CONST char *msg, size_t len); ! typedef int (Ns_LogProc) (Ns_DString *dsPtr, Ns_LogSeverity severity, CONST char *fmt, va_list ap); struct Ns_ObjvSpec; typedef int (Ns_ObjvProc) (struct Ns_ObjvSpec *spec, Tcl_Interp *interp, *************** *** 974,985 **** */ ! NS_EXTERN char *Ns_InfoErrorLog(void); ! NS_EXTERN int Ns_LogRoll(void); ! NS_EXTERN void Ns_Log(Ns_LogSeverity severity, char *fmt, ...) NS_GNUC_PRINTF(2, 3); ! NS_EXTERN void Ns_Fatal(char *fmt, ...) NS_GNUC_PRINTF(1, 2) NS_GNUC_NORETURN; ! NS_EXTERN char *Ns_LogTime(char *timeBuf); ! NS_EXTERN char *Ns_LogTime2(char *timeBuf, int gmt); ! NS_EXTERN void Ns_SetLogFlushProc(Ns_LogFlushProc *procPtr); ! NS_EXTERN void Ns_SetNsLogProc(Ns_LogProc *procPtr); /* --- 974,1002 ---- */ ! NS_EXTERN char * ! Ns_InfoErrorLog(void); ! ! NS_EXTERN int ! Ns_LogRoll(void); ! ! NS_EXTERN void ! Ns_Log(Ns_LogSeverity severity, CONST char *fmt, ...) ! NS_GNUC_PRINTF(2, 3); ! ! NS_EXTERN void ! Ns_Fatal(CONST char *fmt, ...) ! NS_GNUC_PRINTF(1, 2) NS_GNUC_NORETURN; ! ! NS_EXTERN char * ! Ns_LogTime(char *timeBuf); ! ! NS_EXTERN char * ! Ns_LogTime2(char *timeBuf, int gmt); ! ! NS_EXTERN void ! Ns_SetLogFlushProc(Ns_LogFlushProc *procPtr); ! ! NS_EXTERN void ! Ns_SetNsLogProc(Ns_LogProc *procPtr); /* |
From: Stephen D. <sd...@us...> - 2005-08-02 03:51:30
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7362 Modified Files: ChangeLog Log Message: * include/ns.h: * nsd/log.c: Make Tcl send panic messages to the server log. Add some CONST declarations and GCC attributes. * nsd/unix.c: Call Tcl Panic directly from fatal signal handler. Remove unneeded call to pthread_kill_other_threads_np. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.181 retrieving revision 1.182 diff -C2 -d -r1.181 -r1.182 *** ChangeLog 2 Aug 2005 01:45:28 -0000 1.181 --- ChangeLog 2 Aug 2005 03:51:22 -0000 1.182 *************** *** 2,5 **** --- 2,11 ---- * include/ns.h: + * nsd/log.c: Make Tcl send panic messages to the server log. Add + some CONST declarations and GCC attributes. + * nsd/unix.c: Call Tcl Panic directly from fatal signal + handler. Remove unneeded call to pthread_kill_other_threads_np. + + * include/ns.h: * nsd/dsprintf.c: * nsd/dstring.c: Untabify, reformat and add CONST declarations. |
From: Stephen D. <sd...@us...> - 2005-08-02 01:45:42
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21478/nsd Modified Files: dsprintf.c dstring.c Log Message: Untabify, reformat and add CONST declarations. Index: dstring.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/dstring.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dstring.c 10 Jun 2005 17:58:38 -0000 1.2 --- dstring.c 2 Aug 2005 01:45:33 -0000 1.3 *************** *** 1,7 **** /* ! * The contents of this file are subject to the AOLserver Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at ! * http://aolserver.com/. * * Software distributed under the License is distributed on an "AS IS" --- 1,7 ---- /* ! * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at ! * http://mozilla.org/. * * Software distributed under the License is distributed on an "AS IS" *************** *** 32,37 **** * dstring.c -- * ! * Ns_DString routines. Ns_DString's are now compatible ! * with Tcl_DString's. */ --- 32,37 ---- * dstring.c -- * ! * Ns_DString routines. Ns_DString's are now compatible ! * with Tcl_DString's. */ *************** *** 46,56 **** * Ns_DStringVarAppend -- * ! * Append a variable number of string arguments to a dstring. * * Results: ! * Pointer to current dstring value. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 46,56 ---- * Ns_DStringVarAppend -- * ! * Append a variable number of string arguments to a dstring. * * Results: ! * Pointer to current dstring value. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 65,71 **** va_start(ap, dsPtr); while ((s = va_arg(ap, char *)) != NULL) { ! Ns_DStringAppend(dsPtr, s); } va_end(ap); return dsPtr->string; } --- 65,72 ---- va_start(ap, dsPtr); while ((s = va_arg(ap, char *)) != NULL) { ! Ns_DStringAppend(dsPtr, s); } va_end(ap); + return dsPtr->string; } *************** *** 77,88 **** * Ns_DStringExport -- * ! * Return a copy of the string value on the heap. ! * Ns_DString is left in an initialized state. * * Results: ! * Pointer to ns_malloc'ed string which must be eventually freed. * * Side effects: ! * None. * * --- 78,89 ---- * Ns_DStringExport -- * ! * Return a copy of the string value on the heap. ! * Ns_DString is left in an initialized state. * * Results: ! * Pointer to ns_malloc'ed string which must be eventually freed. * * Side effects: ! * None. * * *************** *** 96,106 **** if (dsPtr->string != dsPtr->staticSpace) { ! s = dsPtr->string; ! dsPtr->string = dsPtr->staticSpace; } else { ! s = ns_malloc((size_t)dsPtr->length+1); ! memcpy(s, dsPtr->string, (size_t)(dsPtr->length+1)); } Ns_DStringFree(dsPtr); return s; } --- 97,108 ---- if (dsPtr->string != dsPtr->staticSpace) { ! s = dsPtr->string; ! dsPtr->string = dsPtr->staticSpace; } else { ! s = ns_malloc((size_t) dsPtr->length+1); ! memcpy(s, dsPtr->string, (size_t) (dsPtr->length+1)); } Ns_DStringFree(dsPtr); + return s; } *************** *** 114,118 **** * * Results: ! * Pointer to the current string value. * * Side effects: --- 116,120 ---- * * Results: ! * Pointer to the current string value. * * Side effects: *************** *** 123,129 **** char * ! Ns_DStringAppendArg(Ns_DString *dsPtr, char *string) { ! return Ns_DStringNAppend(dsPtr, string, (int)strlen(string) + 1); } --- 125,131 ---- char * ! Ns_DStringAppendArg(Ns_DString *dsPtr, CONST char *string) { ! return Ns_DStringNAppend(dsPtr, string, (int) strlen(string) + 1); } *************** *** 133,140 **** * Ns_DStringPrintf -- * ! * Append a sequence of values using a format string * * Results: ! * Pointer to the current string value. * * Side effects: --- 135,142 ---- * Ns_DStringPrintf -- * ! * Append a sequence of values using a format string. * * Results: ! * Pointer to the current string value. * * Side effects: *************** *** 145,149 **** char * ! Ns_DStringPrintf(Ns_DString *dsPtr, char *fmt,...) { char *str; --- 147,151 ---- char * ! Ns_DStringPrintf(Ns_DString *dsPtr, CONST char *fmt, ...) { char *str; *************** *** 153,156 **** --- 155,159 ---- str = Ns_DStringVPrintf(dsPtr, fmt, ap); va_end(ap); + return str; } *************** *** 162,169 **** * * Append an argv vector pointing to the null terminated ! * strings in the given dstring. * * Results: ! * Pointer char ** vector appended to end of dstring. * * Side effects: --- 165,172 ---- * * Append an argv vector pointing to the null terminated ! * strings in the given dstring. * * Results: ! * Pointer char ** vector appended to end of dstring. * * Side effects: *************** *** 177,181 **** { char *s, **argv; ! int i, argc, len, size; /* --- 180,184 ---- { char *s, **argv; ! int i, argc, len, size; /* *************** *** 186,191 **** s = dsPtr->string; while (*s != '\0') { ! ++argc; ! s += strlen(s) + 1; } --- 189,194 ---- s = dsPtr->string; while (*s != '\0') { ! ++argc; ! s += strlen(s) + 1; } *************** *** 206,213 **** argv = (char **) (s + len); for (i = 0; i < argc; ++i) { ! argv[i] = s; ! s += strlen(s) + 1; } argv[i] = NULL; return argv; } --- 209,217 ---- argv = (char **) (s + len); for (i = 0; i < argc; ++i) { ! argv[i] = s; ! s += strlen(s) + 1; } argv[i] = NULL; + return argv; } *************** *** 221,225 **** * * Results: ! * Pointer to Ns_DString. * * Side effects: --- 225,229 ---- * * Results: ! * Pointer to Ns_DString. * * Side effects: *************** *** 246,250 **** * * Results: ! * None. * * Side effects: --- 250,254 ---- * * Results: ! * None. * * Side effects: *************** *** 266,270 **** * Compatibility routines -- * ! * Wrappers for old Ns_DString functions. * * Results: --- 270,274 ---- * Compatibility routines -- * ! * Wrappers for old Ns_DString functions. * * Results: Index: dsprintf.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/dsprintf.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dsprintf.c 10 Jun 2005 17:58:38 -0000 1.2 --- dsprintf.c 2 Aug 2005 01:45:33 -0000 1.3 *************** *** 32,39 **** * dsprintf.c -- * ! * Safe Ns_DStringVPrint(dsPtr, fmt, va_list) for flexible ! * format string based appending to a dstring. This code ! * is based on the vfprintf() function from the NetBSD sources ! * (see copyright below). */ --- 32,39 ---- * dsprintf.c -- * ! * Safe Ns_DStringVPrint(dsPtr, fmt, va_list) for flexible ! * format string based appending to a dstring. This code ! * is based on the vfprintf() function from the NetBSD sources ! * (see copyright below). */ *************** *** 111,115 **** char * ! Ns_DStringVPrintf(Tcl_DString *dsPtr, char *fmt0, va_list ap) { CONST char *fmt;/* format string */ --- 111,115 ---- char * ! Ns_DStringVPrintf(Tcl_DString *dsPtr, CONST char *fmt0, va_list ap) { CONST char *fmt;/* format string */ |
From: Stephen D. <sd...@us...> - 2005-08-02 01:45:42
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21478 Modified Files: ChangeLog Log Message: Untabify, reformat and add CONST declarations. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.180 retrieving revision 1.181 diff -C2 -d -r1.180 -r1.181 *** ChangeLog 1 Aug 2005 20:39:41 -0000 1.180 --- ChangeLog 2 Aug 2005 01:45:28 -0000 1.181 *************** *** 1,3 **** ! 2005-07-11 Vlad Seryakov <ser...@us...> * include/ns.h: fixed bug preventing sockcallbacks to --- 1,11 ---- ! 2005-08-01 Stephen Deasey <sd...@us...> ! ! * include/ns.h: ! * nsd/dsprintf.c: ! * nsd/dstring.c: Untabify, reformat and add CONST declarations. ! ! * nsd/log.c: Untabify, reformat and touch up comments. ! ! 2005-08-01 Vlad Seryakov <ser...@us...> * include/ns.h: fixed bug preventing sockcallbacks to |
From: Stephen D. <sd...@us...> - 2005-08-02 01:45:41
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21478/include Modified Files: ns.h Log Message: Untabify, reformat and add CONST declarations. Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** ns.h 1 Aug 2005 20:39:42 -0000 1.43 --- ns.h 2 Aug 2005 01:45:32 -0000 1.44 *************** *** 756,770 **** /* * dstring.c: */ ! NS_EXTERN char **Ns_DStringAppendArgv(Ns_DString *dsPtr); ! NS_EXTERN char *Ns_DStringVarAppend(Ns_DString *dsPtr, ...) NS_GNUC_SENTINEL; ! NS_EXTERN char *Ns_DStringExport(Ns_DString *dsPtr); ! NS_EXTERN char *Ns_DStringPrintf(Ns_DString *dsPtr, char *fmt, ...) NS_GNUC_PRINTF(2,3); ! NS_EXTERN char *Ns_DStringVPrintf(Ns_DString *dsPtr, char *fmt, va_list ap); ! NS_EXTERN char *Ns_DStringAppendArg(Ns_DString *dsPtr, char *string); ! NS_EXTERN Ns_DString *Ns_DStringPop(void); ! NS_EXTERN void Ns_DStringPush(Ns_DString *dsPtr); /* --- 756,797 ---- /* + * dsprintf.c: + */ + + NS_EXTERN char * + Ns_DStringVPrintf(Ns_DString *dsPtr, CONST char *fmt, va_list ap) + NS_GNUC_NONNULL(2); + + /* * dstring.c: */ ! NS_EXTERN char * ! Ns_DStringVarAppend(Ns_DString *dsPtr, ...) ! NS_GNUC_NONNULL(1) NS_GNUC_SENTINEL; ! ! NS_EXTERN char * ! Ns_DStringExport(Ns_DString *dsPtr) ! NS_GNUC_NONNULL(1); ! ! NS_EXTERN char * ! Ns_DStringAppendArg(Ns_DString *dsPtr, CONST char *string) ! NS_GNUC_NONNULL(1) NS_GNUC_NONNULL(2); ! ! NS_EXTERN char * ! Ns_DStringPrintf(Ns_DString *dsPtr, CONST char *fmt, ...) ! NS_GNUC_NONNULL(1) NS_GNUC_PRINTF(2,3); ! ! NS_EXTERN char ** ! Ns_DStringAppendArgv(Ns_DString *dsPtr) ! NS_GNUC_NONNULL(1); ! ! NS_EXTERN Ns_DString * ! Ns_DStringPop(void) ! NS_GNUC_DEPRECATED; ! ! NS_EXTERN void ! Ns_DStringPush(Ns_DString *dsPtr) ! NS_GNUC_DEPRECATED; /* |
From: Stephen D. <sd...@us...> - 2005-08-02 00:29:31
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8971/nsd Modified Files: log.c Log Message: Untabify, reformat and touch up comments. Index: log.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/log.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** log.c 12 Jun 2005 14:42:44 -0000 1.3 --- log.c 2 Aug 2005 00:29:20 -0000 1.4 *************** *** 1,7 **** /* ! * The contents of this file are subject to the AOLserver Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at ! * http://aolserver.com/. * * Software distributed under the License is distributed on an "AS IS" --- 1,7 ---- /* ! * The contents of this file are subject to the Mozilla Public License [...1429 lines suppressed...] - * 2. Without calling Ns_SetLogFlushProc() and handle all buffering - * and writing directly. LogFlush() will be called as normal but - * is a no-op because nothing will have been added. Do not write - * into the Ns_DString passed into the Ns_Log proc in this case. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - - void - Ns_SetNsLogProc(Ns_LogProc *procPtr) - { - nslogProcPtr = procPtr; - } --- 888,889 ---- |
From: Vlad S. <ser...@us...> - 2005-08-01 20:39:54
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23760 Modified Files: ChangeLog Log Message: see ChangeLog Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.179 retrieving revision 1.180 diff -C2 -d -r1.179 -r1.180 *** ChangeLog 1 Aug 2005 16:22:11 -0000 1.179 --- ChangeLog 1 Aug 2005 20:39:41 -0000 1.180 *************** *** 1,4 **** --- 1,8 ---- 2005-07-11 Vlad Seryakov <ser...@us...> + * include/ns.h: fixed bug preventing sockcallbacks to + be used, NS_SOCK_ANY should be 0xff otherwise callback is + removed from the queue. + * include/ns.h: * nsd/nsd.h: |
From: Vlad S. <ser...@us...> - 2005-08-01 20:39:53
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23760/include Modified Files: ns.h Log Message: see ChangeLog Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** ns.h 1 Aug 2005 16:22:13 -0000 1.42 --- ns.h 1 Aug 2005 20:39:42 -0000 1.43 *************** *** 135,139 **** #define NS_SOCK_DROP 0x10 /* Unused */ #define NS_SOCK_CANCEL 0x20 /* Remove event from sock callback thread */ ! #define NS_SOCK_ANY 0x40 /* ??? */ /* --- 135,139 ---- #define NS_SOCK_DROP 0x10 /* Unused */ #define NS_SOCK_CANCEL 0x20 /* Remove event from sock callback thread */ ! #define NS_SOCK_ANY 0xFF /* ??? */ /* |
From: Vlad S. <ser...@us...> - 2005-08-01 20:38:26
|
Update of /cvsroot/naviserver/modules/nsdns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23506 Modified Files: nsdns.c Log Message: Index: nsdns.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsdns/nsdns.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** nsdns.c 1 Aug 2005 18:55:59 -0000 1.16 --- nsdns.c 1 Aug 2005 20:38:15 -0000 1.17 *************** *** 132,136 **** path = Ns_ConfigGetPath(server,module,NULL); ! address = Ns_ConfigGet(path,"address"); if(!Ns_ConfigGetInt(path,"flags",&dnsFlags)) dnsFlags = 0; --- 132,136 ---- path = Ns_ConfigGetPath(server,module,NULL); ! address = Ns_ConfigGetValue(path,"address"); if(!Ns_ConfigGetInt(path,"flags",&dnsFlags)) dnsFlags = 0; *************** *** 145,151 **** if(!Ns_ConfigGetInt(path,"proxyretries",&dnsProxyRetries)) dnsProxyRetries = 2; if (!Ns_ConfigGetInt(path,"threads",&dnsThreads)) dnsThreads = 1; ! dnsDefaultHost = Ns_ConfigGet(path,"defaulthost"); // Resolving dns servers ! dnsInit("nameserver",Ns_ConfigGet(path,"nameserver"),0); /* If no port specified it will be just client dns resolver module */ if(dnsPort > 0) { --- 145,151 ---- if(!Ns_ConfigGetInt(path,"proxyretries",&dnsProxyRetries)) dnsProxyRetries = 2; if (!Ns_ConfigGetInt(path,"threads",&dnsThreads)) dnsThreads = 1; ! dnsDefaultHost = Ns_ConfigGetValue(path,"defaulthost"); // Resolving dns servers ! dnsInit("nameserver",Ns_ConfigGetValue(path,"nameserver"),0); /* If no port specified it will be just client dns resolver module */ if(dnsPort > 0) { *************** *** 164,168 **** // DNS proxy thread if(!Ns_ConfigGetInt(path,"proxyport",&dnsProxyPort)) dnsProxyPort = 53; ! if((dnsProxyHost = Ns_ConfigGet(path,"proxyhost"))) { if(Ns_GetSockAddr(&dnsProxyAddr,dnsProxyHost,dnsProxyPort) != NS_OK || (dnsProxySock = socket(AF_INET,SOCK_DGRAM,0)) == -1) { --- 164,168 ---- // DNS proxy thread if(!Ns_ConfigGetInt(path,"proxyport",&dnsProxyPort)) dnsProxyPort = 53; ! if((dnsProxyHost = Ns_ConfigGetValue(path,"proxyhost"))) { if(Ns_GetSockAddr(&dnsProxyAddr,dnsProxyHost,dnsProxyPort) != NS_OK || (dnsProxySock = socket(AF_INET,SOCK_DGRAM,0)) == -1) { *************** *** 199,203 **** Ns_MutexSetName2(&dnsProxyMutex,"nsdns","proxy"); Ns_Log(Notice,"nsdns: version %s listening on %s:%d, FD %d:%d",VERSION,address?address:"0.0.0.0",dnsPort,dnsUdpSock,dnsTcpSock); ! return Ns_TclInitInterps(server,DnsInterpInit,NULL); } --- 199,204 ---- Ns_MutexSetName2(&dnsProxyMutex,"nsdns","proxy"); Ns_Log(Notice,"nsdns: version %s listening on %s:%d, FD %d:%d",VERSION,address?address:"0.0.0.0",dnsPort,dnsUdpSock,dnsTcpSock); ! Ns_TclRegisterTrace(server, DnsInterpInit, 0, NS_TCL_TRACE_CREATE); ! return NS_OK; } *************** *** 402,406 **** while(hrec) { client = Tcl_GetHashValue(hrec); ! stats = Tcl_HashStats(&client->list); addr.s_addr = (unsigned long)Tcl_GetHashKey(&dnsClientList, hrec); Tcl_AppendElement(interp, ns_inet_ntoa(addr)); --- 403,407 ---- while(hrec) { client = Tcl_GetHashValue(hrec); ! stats = (char*)Tcl_HashStats(&client->list); addr.s_addr = (unsigned long)Tcl_GetHashKey(&dnsClientList, hrec); Tcl_AppendElement(interp, ns_inet_ntoa(addr)); |
From: Vlad S. <ser...@us...> - 2005-08-01 19:51:15
|
Update of /cvsroot/naviserver/modules/nszlib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12196 Modified Files: nszlib.c Log Message: removed old compat functions Index: nszlib.c =================================================================== RCS file: /cvsroot/naviserver/modules/nszlib/nszlib.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nszlib.c 12 Jun 2005 22:34:24 -0000 1.3 --- nszlib.c 1 Aug 2005 19:51:05 -0000 1.4 *************** *** 59,63 **** #define VERSION "1.1" ! DllExport int Ns_ModuleVersion = 1; static int NsZlibInterpInit(Tcl_Interp *,void *) ; --- 59,63 ---- #define VERSION "1.1" ! NS_EXPORT int Ns_ModuleVersion = 1; static int NsZlibInterpInit(Tcl_Interp *,void *) ; *************** *** 67,75 **** unsigned char *Ns_ZlibUncompress(unsigned char *inbuf,unsigned long inlen,unsigned long *outlen); ! DllExport int Ns_ModuleInit(char *hServer,char *hModule) { Ns_Log(Notice,"nszlib: zlib module version %s started",VERSION); ! return (Ns_TclInitInterps(hServer,NsZlibInterpInit, NULL)); } --- 67,76 ---- unsigned char *Ns_ZlibUncompress(unsigned char *inbuf,unsigned long inlen,unsigned long *outlen); ! NS_EXPORT int Ns_ModuleInit(char *hServer,char *hModule) { Ns_Log(Notice,"nszlib: zlib module version %s started",VERSION); ! Ns_TclRegisterTrace(hServer, NsZlibInterpInit, 0, NS_TCL_TRACE_CREATE); ! return NS_OK; } |