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...> - 2006-01-20 21:42:22
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv902 Modified Files: README Log Message: Index: README =================================================================== RCS file: /cvsroot/naviserver/naviserver/README,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README 20 Jan 2006 15:44:55 -0000 1.3 --- README 20 Jan 2006 21:42:14 -0000 1.4 *************** *** 115,119 **** % cd /usr/local/ns ! % bin/nsd -f -t nsd.tcl --- 115,119 ---- % cd /usr/local/ns ! % bin/nsd -f -t conf/nsd.tcl |
From: Vlad S. <ser...@us...> - 2006-01-20 21:41:49
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv707 Modified Files: sample-config.tcl Log Message: Index: sample-config.tcl =================================================================== RCS file: /cvsroot/naviserver/naviserver/sample-config.tcl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sample-config.tcl 20 Jan 2006 21:40:24 -0000 1.7 --- sample-config.tcl 20 Jan 2006 21:41:41 -0000 1.8 *************** *** 39,46 **** # % cp sample-config.tcl myconfig.tcl # % vi myconfig.tcl (edit as needed) ! # % bin/nsd -ft myconfig.tcl (test in foreground) # % bin/nsd -t myconfig.tcl (run in background) # % gdb bin/nsd ! # (gdb) run -fdt myconfig.tcl (run in debugger) # --- 39,46 ---- # % cp sample-config.tcl myconfig.tcl # % vi myconfig.tcl (edit as needed) ! # % bin/nsd -f -t myconfig.tcl (test in foreground) # % bin/nsd -t myconfig.tcl (run in background) # % gdb bin/nsd ! # (gdb) run -f -d -t myconfig.tcl (run in debugger) # |
From: Vlad S. <ser...@us...> - 2006-01-20 21:40:34
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32760 Modified Files: ChangeLog Makefile sample-config.tcl Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.281 retrieving revision 1.282 diff -C2 -d -r1.281 -r1.282 *** ChangeLog 20 Jan 2006 18:57:53 -0000 1.281 --- ChangeLog 20 Jan 2006 21:40:23 -0000 1.282 *************** *** 3,6 **** --- 3,16 ---- * tcl/stats.tcl: fixed all bugs and it runs now under naviserver properly + * m4/tcl.m4: check for USE_THREAD_ALLOC in tclConfig.sh + * Makefile: simplify installation structure, create conf/, logs/, + tcl/ directories. + * sample-config.tcl: re-formatted and make it run, added more + descriptions + * contrib/nsd.tcl: + * contrib/mimetypes.tcl: added new example configs + * include/Makefile.global.in: chanage to simpler installation + structure + * contrib/index.adp: Added default index page 2006-01-19 Vlad Seryakov <ser...@us...> Index: Makefile =================================================================== RCS file: /cvsroot/naviserver/naviserver/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile 20 Oct 2005 23:38:15 -0000 1.16 --- Makefile 20 Jan 2006 21:40:24 -0000 1.17 *************** *** 47,51 **** install-binaries: all ! for i in bin lib log include modules/tcl servers/server1/pages; do \ $(MKDIR) $(NAVISERVER)/$$i; \ done --- 47,51 ---- install-binaries: all ! for i in bin lib logs include tcl pages conf modules cgi-bin; do \ $(MKDIR) $(NAVISERVER)/$$i; \ done *************** *** 54,60 **** done for i in tcl/*.tcl; do \ ! $(INSTALL_DATA) $$i $(NAVISERVER)/modules/tcl/; \ done ! $(INSTALL_DATA) sample-config.tcl $(NAVISERVER)/ $(INSTALL_SH) install-sh $(INSTBIN)/ for i in $(dirs); do \ --- 54,63 ---- done for i in tcl/*.tcl; do \ ! $(INSTALL_DATA) $$i $(NAVISERVER)/tcl/; \ done ! for i in contrib/nsd.tcl contrib/mimetypes.tcl sample-config.tcl; do \ ! $(INSTALL_DATA) $$i $(NAVISERVER)/conf/; \ ! done ! $(INSTALL_DATA) contrib/index.adp $(NAVISERVER)/pages/ $(INSTALL_SH) install-sh $(INSTBIN)/ for i in $(dirs); do \ Index: sample-config.tcl =================================================================== RCS file: /cvsroot/naviserver/naviserver/sample-config.tcl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sample-config.tcl 18 Jan 2006 19:47:53 -0000 1.6 --- sample-config.tcl 20 Jan 2006 21:40:24 -0000 1.7 *************** *** 34,46 **** # sample-config.tcl -- Example config script. # ! # This script is an naviserver configuration script with ! # several example sections. To use: # ! # % cp sample-config.tcl myconfig.tcl ! # % vi myconfig.tcl (edit as needed) ! # % bin/nsd -ft myconfig.tcl (test in foreground) ! # % bin/nsd -t myconfig.tcl (run in background) ! # % gdb bin/nsd ! # (gdb) run -fdt myconfig.tcl (run in debugger) # --- 34,46 ---- # sample-config.tcl -- Example config script. # ! # This script is an naviserver configuration script with ! # several example sections. To use: # ! # % cp sample-config.tcl myconfig.tcl ! # % vi myconfig.tcl (edit as needed) ! # % bin/nsd -ft myconfig.tcl (test in foreground) ! # % bin/nsd -t myconfig.tcl (run in background) ! # % gdb bin/nsd ! # (gdb) run -fdt myconfig.tcl (run in debugger) # *************** *** 49,88 **** # ! set httpport 8000 ! # The hostname and address should be set to actual values. ! set hostname [ns_info hostname] ! set address [ns_info address] ! set servername "server1" ! set serverdesc "Server Name" ! set homedir [file dirname [ns_info config]] ! set bindir [file dirname [ns_info nsd]] ! set serverdir ${homedir}/servers/${servername} ! set pageroot pages ! set directoryfile index.adp,index.html,index.htm,index.xhtml,index.xht # # Global server parameters # ! ns_section "ns/parameters" ! ns_param home $homedir ! ns_param debug false # # I18N Parameters # ! #ns_param HackContentType false ;# automatic adjustment of response ! # content-type header to include charset ! # This defaults to True. ! ns_param OutputCharset iso8859-1 ;# Default output charset. When none specified, ! # no character encoding of output is performed. ! ns_param URLCharset iso8859-1 ;# Default Charset for Url Encode/Decode. ! # When none specified, no character set encoding ! # is performed. ! #ns_param PreferredCharsets { utf-8 iso8859-1 } ;# This parameter supports output ! # encoding arbitration. # --- 49,126 ---- # ! set servername "server1" ! set serverdesc "Server Name" ! # Absolute path to installation directory ! set homedir /usr/local/ns ! # The hostname, address and port for nssock should be set to actual values. ! set hostname [ns_info hostname] ! set address [ns_info address] ! set port 8080 ! # Root directory for each virtual server ! set serverdir ${homedir} ! # Alternatively in case when multiple server share the same ! # installation, server can be put into seperate directories ! #set serverdir ${homedir}/servers/${servername} ! ! # Relative directory under serverdir for html/adp files ! set pageroot pages ! ! # Absolute path to pages directory ! set pagedir $serverdir/$pageroot ! ! # ! # Modules to load ! # ! ! ns_section "ns/server/${servername}/modules" ! ns_param nssock ${homedir}/bin/nssock.so ! ns_param nslog ${homedir}/bin/nslog.so ! ns_param nscgi ${homedir}/bin/nscgi.so ! ns_param nsperm ${homedir}/bin/nsperm.so ! ns_param nscp ${homedir}/bin/nscp.so ! ! # Tcl modules are loaded here as well, they should be put ! # under tcl/ in separate directory each ! #ns_param nstk Tcl # # Global server parameters # ! ! ns_section "ns/parameters" ! ns_param home $homedir ! ns_param debug false ! ! # Where all shared Tcl modules are located ! ns_param tcllibrary ${homedir}/tcl ! ! # Main server log file ! ns_param serverlog ${homedir}/logs/nsd.log ! ! # Pid file of the server process ! ns_param pidfile ${homedir}/logs/nsd.pid # # I18N Parameters # ! ! # Automatic adjustment of response content-type header to include charset ! # This defaults to True. ! ns_param hackcontenttype true ! ! # Default output charset. When none specified, no character encoding of ! # output is performed. ! ns_param outputcharset iso8859-1 ! ! # Default Charset for Url Encode/Decode. When none specified, no character ! # set encoding is performed. ! ns_param urlcharset iso8859-1 ! ! # This parameter supports output encoding arbitration. ! ns_param preferredcharsets { utf-8 iso8859-1 } # *************** *** 92,144 **** # case something is missing you can add it here. # ! ns_section "ns/mimetypes" ! ns_param default "*/*" ;# MIME type for unknown extension. ! ns_param noextension "*/*" ;# MIME type for missing extension. ! #ns_param ".xls" "application/vnd.ms-excel" # # I18N Mime-types # ! # Define content-type header values to be mapped from these file-types. # ! # Note that you can map file-types of adp files to control ! # the output encoding through mime-type specificaion. ! # Remember to add an adp mapping for that extension. # ! ns_param .adp "text/html; charset=iso-8859-1" ! ns_param .u_adp "text/html; charset=UTF-8" ! ns_param .gb_adp "text/html; charset=GB2312" ! ns_param .sjis_html "text/html; charset=shift_jis" ! ns_param .sjis_adp "text/html; charset=shift_jis" ! ns_param .gb_html "text/html; charset=GB2312" ! # # I18N File-type to Encoding mappings # ! ns_section "ns/encodings" ! ns_param .utf_html "utf-8" ! ns_param .sjis_html "shiftjis" ! ns_param .gb_html "gb2312" ! ns_param .big5_html "big5" ! ns_param .euc-cn_html "euc-cn" # # Note: you will need to include file-type to encoding mappings ! # for ANY source files that are to be used, to allow the ! # server to handle them properly. E.g., the following ! # asserts that the GB-producing .adp files are themselves ! # encoded in GB2312 (this is not simply assumed). # ! ns_param .gb_adp "gb2312" ! # # Thread library (nsthread) parameters # ! ns_section "ns/threads" ! #ns_param stacksize [expr 128*1024] ;# Per-thread stack size. - ############################################################ # # Server-level configuration --- 130,184 ---- # case something is missing you can add it here. # ! ! ns_section "ns/mimetypes" ! ! # MIME type for unknown extension. ! ns_param default "*/*" ! ! # MIME type for missing extension. ! ns_param noextension "*/*" # # I18N Mime-types # ! # Define content-type header values to be mapped from these file-types. # ! # Note that you can map file-types of adp files to control ! # the output encoding through mime-type specificaion. ! # Remember to add an adp mapping for that extension. # ! ns_param .adp "text/html; charset=iso-8859-1" ! ns_param .u_adp "text/html; charset=UTF-8" ! ns_param .gb_adp "text/html; charset=GB2312" ! ns_param .sjis_html "text/html; charset=shift_jis" ! ns_param .sjis_adp "text/html; charset=shift_jis" ! ns_param .gb_html "text/html; charset=GB2312" # # I18N File-type to Encoding mappings # ! ns_section "ns/encodings" ! ns_param .utf_html "utf-8" ! ns_param .sjis_html "shiftjis" ! ns_param .gb_html "gb2312" ! ns_param .big5_html "big5" ! ns_param .euc-cn_html "euc-cn" # # Note: you will need to include file-type to encoding mappings ! # for ANY source files that are to be used, to allow the ! # server to handle them properly. E.g., the following ! # asserts that the GB-producing .adp files are themselves ! # encoded in GB2312 (this is not simply assumed). # ! ns_param .gb_adp "gb2312" # # Thread library (nsthread) parameters # ! ns_section "ns/threads" + # Per-thread stack size. + ns_param stacksize [expr 128*1024] # # Server-level configuration *************** *** 150,290 **** # ! ns_section "ns/servers" ! ns_param $servername $serverdesc # # Server parameters # ! ns_section "ns/server/${servername}" ! ns_param directoryfile $directoryfile ! ns_param pageroot $serverdir/$pageroot ! ns_param enabletclpages false ;# Parse *.tcl files in pageroot. ! # ! # Server-level I18N Parameters can be specified here, to override ! # the global ones for this server. These are: ! # HackContentType ! # OutputCharset ! # URLCharset ! # See the global parameter I18N section for a description of these. # # # Scaling and Tuning Options # - # Note: These values aren't necessarily the defaults. - # - #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 # # ADP (AOLserver Dynamic Page) configuration # ! ns_section "ns/server/${servername}/adp" ! ns_param map "/*.adp" ;# Extensions to parse as ADP's. # I18N Note: will need to define I18N specifying mappings of ADP's here as well. ! ns_param map "/*.u_adp" ! ns_param map "/*.gb_adp" ! ns_param map "/*.sjis_adp" ! #ns_param map "/*.html" ;# Any extension can be mapped. ! ns_param enableexpire false ;# Set "Expires: now" on all ADP's. ! ns_param enabledebug false ;# Allow Tclpro debugging with "?debug". ! # ADP special pages ! #ns_param errorpage ${serverdir}/${pageroot}/errorpage.adp ;# ADP error page. # ! # Socket driver module (HTTP) -- nssock # - ns_section "ns/server/${servername}/module/nssock" - ns_param port $httpport - ns_param hostname $hostname - ns_param address $address ! #ns_param maxinput 1024000 ;# Max upload size ! #ns_param maxline 4096 ;# Max line size ! #ns_param bufsize 16384 ;# Read-ahead buffer size ! #ns_param readahead 16384 ;# Max upload size when to use spooler ! #ns_param uploadsize 2048 ;# Max upload size when to use statistics ! #ns_param spoolerthreads 1 ;# Number of spooler threads ! #ns_param writerthreads 0 ;# Number of writer threads ! #ns_param writersize 1048576 ;# Number of writer threads ! # ! # Socket driver logging controls. Default is no logging. ! # ! #ns_param readtimeoutlogging true ;# Timed-out waiting for complete ! # request. ! #ns_param serverrejectlogging true ;# Unable to match request to a virtual ! # server. ! #ns_param sockerrorlogging true ;# Malformed request, or would exceed ! # request limits. ! #ns_param sockshuterrorlogging true ;# Error while attempting to shutdown ! # a socket during connection close. - # Fast Path -- - # - # Fast path configuration is used to configure options used for serving - # static content, and also provides options to automatically display - # directory listings. - # - # Parameters: - # - # serverdir Defines absolute path to server's home directory - # - # pageroot Defines absolute or relative to serverdir directory - # where all html/adp pages are located - # - # cache Boolean. Enable cache for normal URLs. - # Optional, default is false. - # cachemaxsize Integer. Size of fast path cache. - # Optional, default is 5120000. - # cachemaxentry Integer. Largest file size allowed in cache. - # Optional, default is cachemaxsize / 10. - # mmap Boolean. Use mmap() for cache. - # Optional, default is false. - # directoryfile String. Directory index/default page to - # look for. Optional, default is directoryfile - # parameter set in ns/server/${servername} section. - # directorylisting String. Directory listing style. Optional, - # Can be "fancy" or "simple". - # directoryproc String. Name of Tcl proc to use to display - # directory listings. Optional, default is to use - # _ns_dirlist. You can either specify directoryproc, - # or directoryadp - not both. - # directoryadp String. Name of ADP page to use to display - # directory listings. Optional. You can either - # specify directoryadp or directoryproc - not both. - # - # Example: - # - # ns_section "ns/server/${servername}/fastpath" - # ns_param directorylisting fancy - # ns_param serverdir ${serverdir} - # ns_param pagedir ${pageroot} # ! # See also: # - # /naviserver/nsd/fastpath.c - # /naviserver/tcl/fastpath.tcl # # Access log -- nslog # - ns_section "ns/server/${servername}/module/nslog" - ns_param rolllog true ;# Should we roll log? - ns_param rollonsignal true ;# Roll log on SIGHUP. - ns_param rollhour 0 ;# Time to roll log. - ns_param maxbackup 5 ;# Max number to keep around when rolling. - ns_param logreqtime true ;# Log the execution time of request # --- 190,380 ---- # ! ns_section "ns/servers" ! ns_param $servername $serverdesc # # Server parameters # ! # Server-level I18N Parameters can be specified here, to override ! # the global ones for this server. ! # These are: hackcontenttype outputcharset urlcharset ! # See the global parameter I18N section for a description of these. # + ns_section "ns/server/${servername}" + + # Parse *.tcl files in pageroot. + ns_param enabletclpages false + # # Scaling and Tuning Options # + # Normally there's one conn per thread + ns_param connsperthread 0 + # Flush all data before returning + ns_param flushcontent false + # Max connections to put on queue + ns_param maxconnections 100 + # Tune this to scale your server + ns_param maxthreads 10 + # Tune this to scale your server + ns_param minthreads 0 + # Idle threads die at this rate + ns_param threadtimeout 120 # # ADP (AOLserver Dynamic Page) configuration # ! ns_section "ns/server/${servername}/adp" ! # Extensions to parse as ADP's. ! ns_param map "/*.adp" ! # Set "Expires: now" on all ADP's. ! ns_param enableexpire false ! # Allow Tclpro debugging with "?debug". ! ns_param enabledebug false ! # I18N Note: will need to define I18N specifying mappings of ADP's here as well. ! ns_param map "/*.u_adp" ! ns_param map "/*.gb_adp" ! ns_param map "/*.sjis_adp" ! # ADP error page. ! #ns_param errorpage $pagedir/errorpage.adp + # Fast Path -- # ! # Fast path configuration is used to configure options used for serving ! # static content, and also provides options to automatically display ! # directory listings. # ! ns_section "ns/server/${servername}/fastpath" ! # Defines absolute path to server's home directory ! ns_param serverdir ${serverdir} ! # Defines absolute or relative to serverdir directory where all ! # html/adp pages are located ! ns_param pagedir ${pageroot} ! ! # Enable cache for normal URLs. Optional, default is false. ! ns_param cache false ! ! # Size of fast path cache. Optional, default is 5120000. ! ns_param cachemaxsize 5120000 ! ! # Largest file size allowed in cache. Optional, default is cachemaxsize / 10. ! ns_param cachemaxentry 512000 ! ! # Use mmap() for cache. Optional, default is false. ! ns_param mmap false ! ! # Directory index/default page to look for. ! ns_param directoryfile "index.adp index.tcl index.html index.htm" ! ! # Directory listing style. Optional, Can be "fancy" or "simple". ! ns_param directorylisting fancy ! ! # Name of Tcl proc to use to display directory listings. Optional, default is to use ! # _ns_dirlist. You can either specify directoryproc, or directoryadp - not both. ! ns_param directoryproc _ns_dirlist ! ! # Name of ADP page to use to display directory listings. Optional. You can either ! # specify directoryadp or directoryproc - not both. ! #ns_param directoryadp "" # ! # Socket driver module (HTTP) -- nssock # + ns_section "ns/server/${servername}/module/nssock" + + # TCP port server will listen on + ns_param port $port + + # IP address for listener to bind on + ns_param address $address + + # Hostname to use in redirects + ns_param hostname $hostname + + # Max upload size + ns_param maxinput 1024000 + + # Max line size + ns_param maxline 4096 + + # Read-ahead buffer size + ns_param bufsize 16384 + + # Max upload size when to use spooler + ns_param readahead 16384 + + # Max upload size when to use statistics + ns_param uploadsize 2048 + + # Number of spooler threads + ns_param spoolerthreads 1 + + # Number of writer threads + ns_param writerthreads 0 + + # Number of writer threads + ns_param writersize 1048576 + + # Timed-out waiting for complete request. + ns_param readtimeoutlogging false + + # Unable to match request to a virtual server. + ns_param serverrejectlogging false + + # Malformed request, or would exceed request limits. + ns_param sockerrorlogging false + + # Error while attempting to shutdown a socket during connection close. + ns_param sockshuterrorlogging false # # Access log -- nslog # + ns_section "ns/server/${servername}/module/nslog" + # Name to the log file + ns_param file $homedir/logs/access.log + + # If true then use common log format + ns_param formattedtime true + + # If true then use NCSA combined format + ns_param logcombined true + + # Put in the log request elapsed time + ns_param logreqtime false + + # Max # of lines in the buffer, 0 ni limit + ns_param maxbuffer 0 + + # Max # of files to keep when rolling + ns_param maxbackup 100 + + # Time to roll log + ns_param rollhour 0 + + # If true then do the log rolling + ns_param rolllog true + + # If true then roll the log on SIGHUP + ns_param rollonsignal false + + # If true then don't show query string in the log + ns_param suppressquery false + + # If true ten check for X-Forwarded-For header + ns_param checkforproxy false + + # List of additional headers to put in the log + #ns_param extendedheaders "Referer X-Forwarded-For" # *************** *** 293,359 **** # WARNING: These directories must not live under pageroot. # - ns_section "ns/server/${servername}/module/nscgi" - #ns_param map "GET /cgi /usr/local/cgi" ;# CGI script file dir (GET). - #ns_param map "POST /cgi /usr/local/cgi" ;# CGI script file dir (POST). - - - # - # Modules to load - # ! ns_section "ns/server/${servername}/modules" ! ns_param nssock ${bindir}/nssock.so ! ns_param nslog ${bindir}/nslog.so ! #ns_param nscgi ${bindir}/nscgi.so ! #ns_param nsperm ${bindir}/nsperm.so # # Example: Control port configuration. # ! # To enable: # ! # 1. Define an address and port to listen on. For security ! # reasons listening on any port other then 127.0.0.1 is ! # not recommended. ! # ! # 2. Decided whether or not you wish to enable features such ! # as password echoing at login time, and command logging. # ! # 3. Add a list of authorized users and passwords. The entires ! # take the following format: # ! # <user>:<encryptedPassword>: # ! # You can use the ns_crypt Tcl command to generate an encrypted ! # password. The ns_crypt command uses the same algorithm as the ! # Unix crypt(3) command. You could also use passwords from the ! # /etc/passwd file. # ! # The first two characters of the password are the salt - they can be ! # anything since the salt is used to simply introduce disorder into ! # the encoding algorithm. # ! # ns_crypt <key> <salt> ! # ns_crypt x t2 # ! # The configuration example below adds the user "nsadmin" with a ! # password of "x". ! # ! # 4. Make sure the nscp.so module is loaded in the modules section. ! # ! #ns_section "ns/server/${servername}/module/nscp" ! #ns_param address 127.0.0.1 ! #ns_param port 9999 ! #ns_param echopassword 1 ! #ns_param cpcmdlogging 1 ! # ! #ns_section "ns/server/${servername}/module/nscp/users" ! #ns_param user "nsadmin:t2GqvvaiIUbF2:" # ! #ns_section "ns/server/${servername}/modules" ! #ns_param nscp ${bindir}/nscp.so # # --- 383,437 ---- # WARNING: These directories must not live under pageroot. # ! ns_section "ns/server/${servername}/module/nscgi" ! # CGI script file dir (GET). ! ns_param map "GET /cgi-bin /usr/local/cgi" + # CGI script file dir (POST). + ns_param map "POST /cgi-bin /usr/local/cgi" # # Example: Control port configuration. # ! # To enable: # ! # 1. Define an address and port to listen on. For security ! # reasons listening on any port other then 127.0.0.1 is ! # not recommended. # ! # 2. Decided whether or not you wish to enable features such ! # as password echoing at login time, and command logging. # ! # 3. Add a list of authorized users and passwords. The entires ! # take the following format: ! # ! # <user>:<encryptedPassword>: # ! # You can use the ns_crypt Tcl command to generate an encrypted ! # password. The ns_crypt command uses the same algorithm as the ! # Unix crypt(3) command. You could also use passwords from the ! # /etc/passwd file. # ! # The first two characters of the password are the salt - they can be ! # anything since the salt is used to simply introduce disorder into ! # the encoding algorithm. # ! # ns_crypt <key> <salt> ! # ns_crypt x t2 # ! # The configuration example below adds the user "nsadmin" with a ! # password of "x". # ! # 4. Make sure the nscp.so module is loaded in the modules section. # + ns_section "ns/server/${servername}/module/nscp" + ns_param address 127.0.0.1 + ns_param port 9999 + ns_param echopassword true + ns_param cpcmdlogging false + + ns_section "ns/server/${servername}/module/nscp/users" + ns_param user "nsadmin:t2GqvvaiIUbF2:" # *************** *** 368,392 **** # virtual server. # ! #ns_section "ns/modules" ! #ns_param nssock ${bindir}/nssock.so ! # ! #ns_section "ns/module/nssock" ! #ns_param port $httpport ! #ns_param hostname $hostname ! #ns_param address $address ! #ns_param defaultserver server1 ! # ! #ns_section "ns/module/nssock/servers" ! #ns_param server1 $hostname:$httpport ! # # # Example: Dynamic Host headers based virtual servers. # ! # To enable: # ! # 1. Enable by setting enabled to true. ! # 2. For each hosted name create directory under ${serverdir} ! # 3. Each virtual host directory should have ${pageroot} subdirectory # # /usr/local/ns/ --- 446,469 ---- # virtual server. # ! #ns_section "ns/modules" ! #ns_param nssock ${homedir}/bin/nssock.so ! ! ns_section "ns/module/nssock" ! ns_param port $port ! ns_param hostname $hostname ! ns_param address $address ! ns_param defaultserver $servername ! ! ns_section "ns/module/nssock/servers" ! ns_param $servername $hostname:$port # # Example: Dynamic Host headers based virtual servers. # ! # To enable: # ! # 1. Enable by setting enabled to true. ! # 2. For each hosted name create directory under ${serverdir} ! # 3. Each virtual host directory should have ${pageroot} subdirectory # # /usr/local/ns/ *************** *** 398,475 **** # # ! # Parameters: ! # ! # enabled Enable or disable virtual hosting ! # hostprefix Prefix between serverdir and host name ! # stripport Remove :port in the Host: header when ! # building pageroot path so Host: www.host.com:80 ! # will result in pageroot ${serverdir}/www.host.com ! # stripwww Remove www. prefix from Host: header ! # when building pageroot path so Host: www.host.com ! # will result in pageroot ${serverdir}/host.com ! # hosthashlevel Hash the leading characters of string into a path, skipping ! # periods and slashes. If string contains less characters than ! # levels requested, '_' characters are used as padding. ! # For example, given the string 'foo' and the levels 2, 3: ! # foo, 2 -> /f/o ! # foo, 3 -> /f/o/o ! # ! #ns_section "ns/server/${servername}/vhost" ! #ns_param enabled true ! #ns_param hostprefix "" ! #ns_param hosthashlevel 0 ! #ns_param stripport true ! #ns_param stripwww true # # Example: Multiple connection thread pools. # ! # To enable: # ! # 1. Define one or more thread pools. ! # 2. Configure pools as with the default server pool. ! # 3. Map method/URL combinations to the pools # ! # All unmapped method/URL's will go to the default server pool. # - #ns_section ns/server/server1/pools - #ns_section slow "Slow requests here." - #ns_section fast "Fast requests here." - # - #ns_section ns/server/server1/pool/slow - #ns_param map {POST /slowupload.adp} - #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 - # - #ns_section ns/server/server1/pool/fast - #ns_param map {GET /faststuff.adp} - #ns_param maxthreads 10 - # # # Example: Web based stats interface. # ! # To enable: # ! # 1. Configure whether or not stats are enabled. (Optional: default = false) ! # 2. Configure URL for statistics. (Optional: default = /_stats) # # http://<host>:<port>/_stats # ! # 3. Configure user. (Optional: default = naviserver) ! # 4. Configure password. (Optional: default = stats) # ! # For added security it is recommended that configure your own ! # URL, user, and password instead of using the default values. # ! #ns_section ns/server/stats ! #ns_param enabled 1 ! #ns_param url /naviserver/stats ! #ns_param user nsadmin ! #ns_param password 23dfs!d ! # --- 475,547 ---- # # ! ns_section "ns/server/${servername}/vhost" ! # Enable or disable virtual hosting ! ns_param enabled false ! ! # Prefix between serverdir and host name ! ns_param hostprefix "" ! ! # Remove :port in the Host: header when building pageroot path so Host: www.host.com:80 ! # will result in pageroot ${serverdir}/www.host.com ! ns_param stripport true ! ! # Remove www. prefix from Host: header when building pageroot path so Host: www.host.com ! # will result in pageroot ${serverdir}/host.com ! ns_param stripwww true ! ! # Hash the leading characters of string into a path, skipping periods and slashes. ! # If string contains less characters than levels requested, '_' characters are used as padding. ! # For example, given the string 'foo' and the levels 2, 3: ! # foo, 2 -> /f/o ! # foo, 3 -> /f/o/o ! ns_param hosthashlevel 0 # # Example: Multiple connection thread pools. # ! # To enable: # ! # 1. Define one or more thread pools. ! # 2. Configure pools as with the default server pool. ! # 3. Map method/URL combinations to the pools # ! # All unmapped method/URL's will go to the default server pool. # + ns_section "ns/server/server1/pools" + ns_param slow "Slow requests here." + ns_param fast "Fast requests here." + + ns_section "ns/server/server1/pool/slow" + ns_param map "POST /slowupload.adp" + ns_param maxthreads 20 + ns_param minthreads 0 + + ns_section "ns/server/server1/pool/fast" + ns_param map "GET /faststuff.adp" + ns_param maxthreads 10 # # Example: Web based stats interface. # ! # To enable: # ! # 1. Configure whether or not stats are enabled. (Optional: default = false) ! # 2. Configure URL for statistics. (Optional: default = /_stats) # # http://<host>:<port>/_stats # ! # 3. Configure user. (Optional: default = naviserver) ! # 4. Configure password. (Optional: default = stats) # ! # For added security it is recommended that configure your own ! # URL, user, and password instead of using the default values. # ! ! ns_section "ns/server/stats" ! ns_param enabled 1 ! ns_param url /_stats ! ns_param user nsadmin ! ns_param password nsadmin ! |
From: Vlad S. <ser...@us...> - 2006-01-20 21:40:33
|
Update of /cvsroot/naviserver/naviserver/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32760/contrib Added Files: index.adp mimetypes.tcl nsd.tcl Log Message: --- NEW FILE: mimetypes.tcl --- ns_param .323 text/h323 ns_param .3dm x-world/x-3dmf ns_param .3dmf x-world/x-3dmf ns_param .acx application/internet-property-stream ns_param .axs application/olescript ns_param .aab application/x-authorware-bin ns_param .aam application/x-authorware-map ns_param .aas application/x-authorware-seg ns_param .abc text/vnd.abc ns_param .acgi text/html ns_param .afl video/animaflex ns_param .ai application/postscript ns_param .aif audio/x-aiff ns_param .aifc audio/x-aiff ns_param .aiff audio/x-aiff ns_param .aim application/x-aim ns_param .aip text/x-audiosoft-intra ns_param .ani application/x-navi-animation ns_param .aos application/x-nokia-9000-communicator-add-on-software ns_param .aps application/mime ns_param .arc application/octet-stream ns_param .arj application/arj ns_param .arj application/octet-stream ns_param .art image/x-jg ns_param .asf video/x-ms-asf ns_param .asm text/x-asm ns_param .asp text/asp ns_param .asx video/x-ms-asf ns_param .asr video/x-ms-asf ns_param .au audio/basic ns_param .avi video/x-msvideo ns_param .avi video/x-msvideo ns_param .avs video/avs-video ns_param .bas text/plain ns_param .bin application/octet-stream ns_param .bcpio application/x-bcpio ns_param .bm image/bmp ns_param .bmp image/bmp ns_param .boo application/book ns_param .book application/book ns_param .boz application/x-bzip2 ns_param .bsh application/x-bsh ns_param .bz application/x-bzip ns_param .bz2 application/x-bzip2 ns_param .clp application/x-msclip ns_param .cmx image/x-cmx ns_param .cod image/cis-cod ns_param .crd application/x-mscardfile ns_param .c text/plain ns_param .c++ text/plain ns_param .cat application/vnd.ms-pki.seccat ns_param .cc text/plain ns_param .ccad application/clariscad ns_param .cco application/x-cocoa ns_param .cdf application/x-cdf ns_param .cer application/x-x509-ca-cert ns_param .cha application/x-chat ns_param .chat application/x-chat ns_param .class application/octet-stream ns_param .com application/octet-stream ns_param .conf text/plain ns_param .cpio application/x-cpio ns_param .cpp text/plain ns_param .cpt application/x-cpt ns_param .crl application/pkix-crl ns_param .crt application/x-x509-ca-cert ns_param .csh application/x-csh ns_param .css text/css ns_param .cxx text/plain ns_param .dll application/x-msdownload ns_param .dms application/octet-stream ns_param .dcr application/x-director ns_param .deepv application/x-deepv ns_param .def text/plain ns_param .der application/x-x509-ca-cert ns_param .dif video/x-dv ns_param .dir application/x-director ns_param .dl video/x-dl ns_param .doc application/msword ns_param .dot application/msword ns_param .dp application/commonground ns_param .drw application/drafting ns_param .dump application/octet-stream ns_param .dv video/x-dv ns_param .dvi application/x-dvi ns_param .dwf model/vnd.dwf ns_param .dwg image/vnd.dwg ns_param .dxf application/dxf ns_param .dxr application/x-director ns_param .el text/x-script.elisp ns_param .elc application/x-elc ns_param .env application/x-envoy ns_param .eps application/postscript ns_param .es application/x-esrehber ns_param .etx text/x-setext ns_param .evy application/envoy ns_param .evy application/x-envoy ns_param .exe application/octet-stream ns_param .fif application/fractals ns_param .flr x-world/x-vrml ns_param .f text/plain ns_param .f77 text/x-fortran ns_param .f90 text/plain ns_param .fdf application/vnd.fdf ns_param .fli video/x-fli ns_param .flo image/florian ns_param .flx text/vnd.fmi.flexstor ns_param .fmf video/x-atomic3d-feature ns_param .for text/plain ns_param .fpx image/vnd.fpx ns_param .frl application/freeloader ns_param .funk audio/make ns_param .g text/plain ns_param .g3 image/g3fax ns_param .gif image/gif ns_param .gl video/gl ns_param .gsd audio/x-gsm ns_param .gsm audio/x-gsm ns_param .gsp application/x-gsp ns_param .gss application/x-gss ns_param .gtar application/x-gtar ns_param .gz application/x-gzip ns_param .gzip application/x-gzip ns_param .h text/plain ns_param .hdf application/x-hdf ns_param .help application/x-helpfile ns_param .hgl application/vnd.hp-HPGL ns_param .hh text/plain ns_param .hlb text/x-script ns_param .hlp application/winhlp ns_param .hpg application/vnd.hp-HPGL ns_param .hpgl application/vnd.hp-HPGL ns_param .hqx application/mac-binhex40 ns_param .hta application/hta ns_param .htc text/x-component ns_param .htm text/html ns_param .html text/html ns_param .htmls text/html ns_param .htt text/webviewhtml ns_param .htx text/html ns_param .iii application/x-iphone ns_param .isp application/x-internet-signup ns_param .ice x-conference/x-cooltalk ns_param .ico image/x-icon ns_param .idc text/plain ns_param .ief image/ief ns_param .iefs image/ief ns_param .iges application/iges ns_param .igs application/iges ns_param .ima application/x-ima ns_param .imap application/x-httpd-imap ns_param .inf application/inf ns_param .ins application/x-internett-signup ns_param .ip application/x-ip2 ns_param .isu video/x-isvideo ns_param .it audio/it ns_param .iv application/x-inventor ns_param .ivr i-world/i-vrml ns_param .ivy application/x-livescreen ns_param .jam audio/x-jam ns_param .jav text/plain ns_param .java text/plain ns_param .jcm application/x-java-commerce ns_param .jfif image/jpeg ns_param .jfif-tbnl image/jpeg ns_param .jpe image/jpeg ns_param .jpe image/pjpeg ns_param .jpeg image/jpeg ns_param .jpg image/jpeg ns_param .jps image/x-jps ns_param .js application/x-javascript ns_param .jut image/jutvision ns_param .kar audio/midi ns_param .ksh application/x-ksh ns_param .latex application/x-latex ns_param .lha application/octet-stream ns_param .lsf video/x-la-asf ns_param .lsx video/x-la-asf ns_param .la audio/nspaudio ns_param .lam audio/x-liveaudio ns_param .latex application/x-latex ns_param .lhx application/octet-stream ns_param .list text/plain ns_param .lma audio/nspaudio ns_param .log text/plain ns_param .lsp application/x-lisp ns_param .lst text/plain ns_param .lsx text/x-la-asf ns_param .ltx application/x-latex ns_param .lzh application/x-lzh ns_param .lzx application/lzx ns_param .m13 application/x-msmediaview ns_param .m14 application/x-msmediaview ns_param .mny application/x-msmoney ns_param .mpv2 video/mpeg ns_param .mvb application/x-msmediaview ns_param .m text/plain ns_param .m1v video/mpeg ns_param .m2a audio/mpeg ns_param .m2v video/mpeg ns_param .m3u audio/x-mpequrl ns_param .man application/x-troff-man ns_param .map application/x-navimap ns_param .mar text/plain ns_param .mbd application/mbedlet ns_param .mc$ application/x-magic-cap-package-1.0 ns_param .mcd application/mcad ns_param .mcf text/mcf ns_param .mcp application/netmc ns_param .mdb application/msaccess ns_param .me application/x-troff-me ns_param .mht message/rfc822 ns_param .mhtml message/rfc822 ns_param .mid audio/midi ns_param .midi audio/midi ns_param .mif application/x-mif ns_param .mime message/rfc822 ns_param .mjf audio/x-vnd.AudioExplosion.MjuiceMediaFile ns_param .mjpg video/x-motion-jpeg ns_param .mm application/base64 ns_param .mme application/base64 ns_param .mod audio/mod ns_param .moov video/quicktime ns_param .mov video/quicktime ns_param .movie video/x-sgi-movie ns_param .mp2 audio/mpeg ns_param .mp3 video/mpeg ns_param .mpa video/mpeg ns_param .mpc application/x-project ns_param .mpe video/mpeg ns_param .mpeg video/mpeg ns_param .mpg video/mpeg ns_param .mpga audio/mpeg ns_param .mpp application/vnd.ms-project ns_param .mpt application/x-project ns_param .mpv application/x-project ns_param .mpx application/x-project ns_param .mrc application/marc ns_param .ms application/x-troff-ms ns_param .mv video/x-sgi-movie ns_param .my audio/make ns_param .mzz application/x-vnd.AudioExplosion.mzz ns_param .nap image/naplps ns_param .naplps image/naplps ns_param .nc application/x-netcdf ns_param .ncm application/vnd.nokia.configuration-message ns_param .nif image/x-niff ns_param .niff image/x-niff ns_param .nix application/x-mix-transfer ns_param .nsc application/x-conference ns_param .nvd application/x-navidoc ns_param .nws message/rfc822 ns_param .o application/octet-stream ns_param .oda application/oda ns_param .omc application/x-omc ns_param .omcd application/x-omcdatamaker ns_param .omcr application/x-omcregerator ns_param .p text/x-pascal ns_param .p10 application/pkcs10 ns_param .p12 application/pkcs-12 ns_param .p7a application/x-pkcs7-signature ns_param .p7c application/pkcs7-mime ns_param .p7b application/x-pkcs7-certificates ns_param .p7c application/x-pkcs7-mime ns_param .p7m application/x-pkcs7-mime ns_param .p7r application/x-pkcs7-certreqresp ns_param .p7s application/x-pkcs7-signature ns_param .part application/pro_eng ns_param .pas text/pascal ns_param .pbm image/x-portable-bitmap ns_param .pcl application/x-pcl ns_param .pct image/x-pict ns_param .pcx image/x-pcx ns_param .pdb chemical/x-pdb ns_param .pdf application/pdf ns_param .pfunk audio/make ns_param .pfx application/x-pkcs12 ns_param .pgm image/x-portable-graymap ns_param .pic image/pict ns_param .pict image/pict ns_param .pkg application/x-newton-compatible-pkg ns_param .pko application/vnd.ms-pki.pko ns_param .pl text/plain ns_param .plx application/x-PiXCLscript ns_param .pm image/x-xpixmap ns_param .pma application/x-perfmon ns_param .pmc application/x-perfmon ns_param .pml application/x-perfmon ns_param .pmr application/x-perfmon ns_param .pmw application/x-perfmon ns_param .pm4 application/x-pagemaker ns_param .pm5 application/x-pagemaker ns_param .png image/png ns_param .pnm image/x-portable-anymap ns_param .pot application/vnd.ms-powerpoint ns_param .pov model/x-pov ns_param .ppa application/vnd.ms-powerpoint ns_param .ppm image/x-portable-pixmap ns_param .pps application/vnd.ms-powerpoint ns_param .ppt application/vnd.ms-powerpoint ns_param .ppz application/vnd.mspowerpoint ns_param .pre application/x-freelance ns_param .prt application/pro_eng ns_param .ps application/postscript ns_param .psd application/octet-stream ns_param .pvu paleovu/x-pv ns_param .pwz application/vnd.ms-powerpoint ns_param .prf application/pics-rules ns_param .pub application/x-mspublisher ns_param .py text/x-script.phyton ns_param .pyc applicaiton/x-bytecode.python ns_param .qcp audio/vnd.qcelp ns_param .qd3 x-world/x-3dmf ns_param .qd3d x-world/x-3dmf ns_param .qif image/x-quicktime ns_param .qt video/quicktime ns_param .qtc video/x-qtc ns_param .qti image/x-quicktime ns_param .qtif image/x-quicktime ns_param .ra audio/x-pn-realaudio ns_param .ram audio/x-pn-realaudio ns_param .ras image/x-cmu-raster ns_param .rast image/x-cmu-raster ns_param .rexx text/x-script.rexx ns_param .rf image/vnd.rn-realflash ns_param .rgb image/x-rgb ns_param .rm application/vnd.rn-realmedia ns_param .rm audio/x-pn-realaudio ns_param .rmi audio/mid ns_param .rmm audio/x-pn-realaudio ns_param .rmp audio/x-pn-realaudio ns_param .rmp audio/x-pn-realaudio-plugin ns_param .rng application/vnd.nokia.ringing-tone ns_param .rnx application/vnd.rn-realplayer ns_param .roff application/x-troff ns_param .rp image/vnd.rn-realpix ns_param .rpm audio/x-pn-realaudio-plugin ns_param .rt text/richtext ns_param .rtf application/msword ns_param .rtx application/richtext ns_param .rv video/vnd.rn-realvideo ns_param .scd application/x-msschedule ns_param .sct text/scriptlet ns_param .setpay application/set-payment-initiation ns_param .setreg application/set-registration-initiation ns_param .s text/plain ns_param .s3m audio/s3m ns_param .saveme application/octet-stream ns_param .sbk application/x-tbook ns_param .scm video/x-scm ns_param .sdml text/plain ns_param .sdp application/sdp ns_param .sdr application/sounder ns_param .sea application/sea ns_param .set application/set ns_param .sgm text/sgml ns_param .sgml text/sgml ns_param .sh application/x-sh ns_param .shar application/x-shar ns_param .shtml text/html ns_param .sid audio/x-psid ns_param .sit application/x-stuffit ns_param .skd application/x-koan ns_param .skm application/x-koan ns_param .skp application/x-koan ns_param .skt application/x-koan ns_param .sl application/x-seelogo ns_param .smi application/smil ns_param .smil application/smil ns_param .snd audio/basic ns_param .sol application/solids ns_param .spc application/x-pkcs7-certificates ns_param .spl application/futuresplash ns_param .spr application/x-sprite ns_param .sprite application/x-sprite ns_param .src application/x-wais-source ns_param .ssi text/x-server-parsed-html ns_param .ssm application/streamingmedia ns_param .sst application/vnd.ms-pki.certstore ns_param .step application/step ns_param .stl application/vnd.ms-pki.stl ns_param .stp application/step ns_param .stm text/html ns_param .sv4cpio application/x-sv4cpio ns_param .sv4crc application/x-sv4crc ns_param .svf image/vnd.dwg ns_param .svr application/x-world ns_param .swf application/x-shockwave-flash ns_param .trm application/x-msterminal ns_param .t application/x-troff ns_param .talk text/x-speech ns_param .tar application/x-tar ns_param .tbk application/toolbook ns_param .tcl application/x-tcl ns_param .tcsh text/x-script.tcsh ns_param .tex application/x-tex ns_param .texi application/x-texinfo ns_param .texinfo application/x-texinfo ns_param .text text/plain ns_param .tgz application/x-compressed ns_param .tif image/tiff ns_param .tiff image/tiff ns_param .tr application/x-troff ns_param .tsi audio/tsp-audio ns_param .tsp audio/tsplayer ns_param .tsv text/tab-separated-values ns_param .turbot image/florian ns_param .txt text/plain ns_param .uil text/x-uil ns_param .uni text/uri-list ns_param .unis text/uri-list ns_param .unv application/i-deas ns_param .uri text/uri-list ns_param .uris text/uri-list ns_param .ustar application/x-ustar ns_param .uu text/x-uuencode ns_param .uue text/x-uuencode ns_param .uls text/iuls ns_param .vcd application/x-cdlink ns_param .vcs text/x-vCalendar ns_param .vcf text/x-vcard ns_param .vda application/vda ns_param .vdo video/vdo ns_param .vew application/groupwise ns_param .viv video/vnd.vivo ns_param .vivo video/vnd.vivo ns_param .vmd application/vocaltec-media-desc ns_param .vmf application/vocaltec-media-file ns_param .voc audio/voc ns_param .vos video/vosaic ns_param .vox audio/voxware ns_param .vqe audio/x-twinvq-plugin ns_param .vqf audio/x-twinvq ns_param .vql audio/x-twinvq-plugin ns_param .vrml x-world/x-vrml ns_param .vrt x-world/x-vrt ns_param .vsd application/vnd.visio ns_param .vst application/x-visio ns_param .vsw application/x-visio ns_param .wav audio/x-wav ns_param .wcm application/vnd.ms-works ns_param .wdb application/vnd.ms-works ns_param .wks application/vnd.ms-works ns_param .wmf application/x-msmetafile ns_param .w60 application/wordperfect6.0 ns_param .w61 application/wordperfect6.1 ns_param .w6w application/msword ns_param .wb1 application/x-qpro ns_param .wbmp image/vnd.wap.wbmp ns_param .web application/vnd.xara ns_param .wiz application/msword ns_param .wk1 application/x-123 ns_param .wma application/x-ms-wma ns_param .wml text/vnd.wap.wml ns_param .wmlc application/vnd.wap.wmlc ns_param .wmls text/vnd.wap.wmlscript ns_param .wmlsc application/vnd.wap.wmlscriptc ns_param .word application/msword ns_param .wp application/wordperfect ns_param .wp5 application/wordperfect ns_param .wp5 application/wordperfect6.0 ns_param .wp6 application/wordperfect ns_param .wpd application/wordperfect ns_param .wpd application/x-wpwin ns_param .wq1 application/x-lotus ns_param .wps application/vnd.ms-works ns_param .wri application/x-mswrite ns_param .wrl x-world/x-vrml ns_param .wrz x-world/x-vrml ns_param .wsc text/scriplet ns_param .wsrc application/x-wais-source ns_param .wtk application/x-wintalk ns_param .xaf x-world/x-vrml ns_param .x-png image/png ns_param .xbm image/x-xbitmap ns_param .xdr video/x-amt-demorun ns_param .xgz xgl/drawing ns_param .xif image/vnd.xiff ns_param .xl application/excel ns_param .xla application/vnd.ms-excel ns_param .xlb application/vnd.ms-excel ns_param .xlc application/vnd.ms-excel ns_param .xld application/vnd.ms-excel ns_param .xlk application/vnd.ms-excel ns_param .xll application/vnd.ms-excel ns_param .xlm application/vnd.ms-excel ns_param .xls application/vnd.ms-excel ns_param .xlt application/vnd.ms-excel ns_param .xlv application/vnd.ms-excel ns_param .xlw application/vnd.ms-excel ns_param .xm audio/xm ns_param .xml text/xml ns_param .xmz xgl/movie ns_param .xpix application/x-vnd.ls-xpix ns_param .xof x-world/x-vrml ns_param .xpm image/x-xpixmap ns_param .xsr video/x-amt-showrun ns_param .xwd image/x-xwindowdump ns_param .xwd image/x-xwindowdump ns_param .xyz chemical/x-pdb ns_param .z application/x-compress ns_param .zip application/zip ns_param .zoo application/octet-stream ns_param .zsh text/x-script.zsh --- NEW FILE: index.adp --- <HTML> <HEAD> <TITLE>Default Page for Naviserver Installation</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#000080" ALINK="#FF0000" > <H1 ALIGN="CENTER"> Welcome to <A HREF="http://naviserver.sourceforge.net/">Naviserver</A> on <%=[string totitle [ns_info platform]]%> </H1> <P> If you can see this page, then the people who own this host have just activated the <A HREF="http://naviserver.sourceforge.net/">Naviserver Web server</A> software. They now have to add content to this directory and replace this placeholder page, or else point the server at their real content. </P> <HR> <P> The Naviserver statistics <A HREF="_stats">page</A> can be usefull in resolving performance issues. </P> </BODY> </HTML> --- NEW FILE: nsd.tcl --- set home /usr/local/ns set server default ns_section "ns/server/${server}/modules" ns_param nscp ${home}/bin/nscp.so ns_param nssock ${home}/bin/nssock.so ns_param nslog ${home}/bin/nslog.so ns_param nscgi ${home}/bin/nscgi.so ns_param nsdb ${home}/bin/nsdb.so ns_section "ns/parameters" ns_param home $home ns_param user nobody ns_param group nobody ns_param debug true ns_param logroll true ns_param tcllibrary ${home}/tcl ns_param serverlog ${home}/logs/nsd.log ns_param pidfile ${home}/logs/nsd.pid ns_param outputcharset iso8859-1 ns_param urlcharset iso8859-1 ns_section "ns/threads" ns_param stacksize [expr 1024*1024] ns_section "ns/mimetypes" ns_param default text/plain ns_param noextension text/plain source ${home}/conf/mimetypes.tcl ns_section "ns/db/drivers" #ns_param postgres ${home}/bin/nspostgres.so ns_section "ns/db/pools" #ns_param postgres "PostgresSQL Database" ns_section "ns/db/pool/pgsql" ns_param driver postgres ns_param connections 64 ns_param user postgres ns_param datasource "::dbname" ns_param verbose Off ns_param logsqlerrors On ns_param extendedtableinfo On ns_param maxidle 31536000 ns_param maxopen 31536000 ns_section "ns/servers" ns_param ${server} "Naviserver" ns_section "ns/server/${server}" ns_param pageroot ${home}/pages ns_param globalstats true ns_param urlstats true ns_param maxurlstats 1000 ns_param checkmodifiedsince true ns_param enabletclpages true ns_param maxthreads 100 ns_param maxconnections 100 ns_param threadtimeout 1800 ns_section "ns/server/${server}/db" ns_param pools * ns_section "ns/server/${server}/fastpath" ns_param serverdir ${home} ns_param pagedir pages ns_param directoryfile "index.adp index.tcl index.html index.htm" ns_param directoryproc _ns_dirlist ns_param directorylisting fancy ns_section "ns/server/${server}/vhost" ns_param enabled false ns_param hostprefix "" ns_param hosthashlevel 0 ns_param stripport true ns_param stripwww true ns_section "ns/server/${server}/adp" ns_param map "/*.adp" ns_param fancy true ns_param defaultparser fancy ns_param enableexpire false ns_param enabledebug true ns_param cache true ns_param cachesize [expr 10000*1024] ns_param taglocks false ns_section "ns/server/${server}/adp/parsers" ns_param fancy ".adp" ns_section "ns/server/${server}/tcl" ns_param debug false ns_param nsvbuckets 16 ns_param library ${home} ns_section "ns/server/${server}/module/nscgi" ns_param map "GET /cgi-bin ${home}/cgi-bin" ns_param map "POST /cgi-bin ${home}/cgi-bin" ns_param interps interps ns_section "ns/server/${server}/module/nslog" ns_param file ${home}/logs/access.log ns_param rolllog true ns_param rollonsignal false ns_param rollhour 0 ns_param maxbackup 7 ns_section "ns/server/${server}/module/nssock" ns_param port 8080 ns_param address 0.0.0.0 ns_param hostname [ns_info hostname] ns_param maxinput [expr 1024*1024*10] ns_param readahead [expr 1024*1024*1] ns_param spoolerthreads 1 ns_param uploadsize [expr 1024*1024*1] ns_param writerthreads 0 ns_param writersize [expr 1024*1024*5] ns_section "ns/server/${server}/module/nscp" ns_param port 4080 ns_param address 127.0.0.1 ns_section "ns/server/${server}/module/nscp/users" ns_param user "::" ns_section ns/server/stats ns_param enabled 1 ns_param url /_stats ns_param user nsadmin ns_param password nsadmin |
From: Vlad S. <ser...@us...> - 2006-01-20 21:40:32
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32760/include Modified Files: Makefile.global.in Log Message: Index: Makefile.global.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/Makefile.global.in,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile.global.in 21 Oct 2005 12:04:44 -0000 1.12 --- Makefile.global.in 20 Jan 2006 21:40:24 -0000 1.13 *************** *** 103,108 **** INSTHDR = $(NAVISERVER)/include INSTMOD = $(NAVISERVER)/modules ! INSTTCL = $(NAVISERVER)/modules/tcl ! INSTSRV = $(NAVISERVER)/servers/server1 INSTSRVMOD = $(INSTSRV)/modules INSTSRVPAG = $(INSTSRV)/pages --- 103,108 ---- INSTHDR = $(NAVISERVER)/include INSTMOD = $(NAVISERVER)/modules ! INSTTCL = $(NAVISERVER)/tcl ! INSTSRV = $(NAVISERVER)/ INSTSRVMOD = $(INSTSRV)/modules INSTSRVPAG = $(INSTSRV)/pages |
From: Vlad S. <ser...@us...> - 2006-01-20 21:40:32
|
Update of /cvsroot/naviserver/naviserver/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32760/m4 Modified Files: tcl.m4 Log Message: Index: tcl.m4 =================================================================== RCS file: /cvsroot/naviserver/naviserver/m4/tcl.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcl.m4 21 Oct 2005 12:04:14 -0000 1.2 --- tcl.m4 20 Jan 2006 21:40:24 -0000 1.3 *************** *** 528,533 **** if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants. ! AC_DEFINE(USE_THREAD_ALLOC, 1, ! [Do we want to use the threaded memory allocator?]) AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?]) --- 528,537 ---- if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants. ! case ${TCL_DEFS} in ! *DUSE_THREAD_ALLOC=1*) ! AC_DEFINE(USE_THREAD_ALLOC, 1, ! [Do we want to use the threaded memory allocator?]) ! ;; ! esac AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?]) |
From: Vlad S. <ser...@us...> - 2006-01-20 21:38:12
|
Update of /cvsroot/naviserver/naviserver/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31842/contrib Log Message: Directory /cvsroot/naviserver/naviserver/contrib added to the repository |
From: Vlad S. <ser...@us...> - 2006-01-20 18:58:01
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30701 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.280 retrieving revision 1.281 diff -C2 -d -r1.280 -r1.281 *** ChangeLog 20 Jan 2006 06:04:59 -0000 1.280 --- ChangeLog 20 Jan 2006 18:57:53 -0000 1.281 *************** *** 1,2 **** --- 1,7 ---- + 2006-01-20 Vlad Seryakov <ser...@us...> + + * tcl/stats.tcl: fixed all bugs and it runs now under naviserver + properly + 2006-01-19 Vlad Seryakov <ser...@us...> |
From: Vlad S. <ser...@us...> - 2006-01-20 18:57:44
|
Update of /cvsroot/naviserver/naviserver/tcl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30669 Modified Files: stats.tcl Log Message: Index: stats.tcl =================================================================== RCS file: /cvsroot/naviserver/naviserver/tcl/stats.tcl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** stats.tcl 16 Feb 2005 08:40:42 -0000 1.1.1.1 --- stats.tcl 20 Jan 2006 18:57:37 -0000 1.2 *************** *** 28,32 **** nsv_set _ns_stats enabled $enabled nsv_set _ns_stats url $url ! nsv_set _ns_stats user [ns_config $path user "aolserver"] nsv_set _ns_stats password [ns_config $path password "stats"] --- 28,32 ---- nsv_set _ns_stats enabled $enabled nsv_set _ns_stats url $url ! nsv_set _ns_stats user [ns_config $path user "naviserver"] nsv_set _ns_stats password [ns_config $path password "stats"] *************** *** 173,182 **** foreach cache [ns_cache_names] { ! set t [ns_cache_stats $cache] ! ! scan [ns_cache_size $cache] "%d %d" M N ! scan $t "entries: %d flushed: %d hits: %d misses: %d hitrate: %d" e f h m p ! ! lappend results [list $cache $M $N $e $f $h $m "$p%"] } --- 173,178 ---- foreach cache [ns_cache_names] { ! array set t [ns_cache_stats $cache] ! lappend results [list $cache $t(maxsize) $t(size) $t(entries) $t(flushed) $t(hits) $t(missed) "$t(hitrate)%"] } *************** *** 291,295 **** set twaits 0 set tfree 0 ! set tops 0 set html [_ns_stats.header Memory] --- 287,294 ---- set twaits 0 set tfree 0 ! set tops 0 ! set ov 0 ! set op 0 ! set av 0 set html [_ns_stats.header Memory] *************** *** 362,373 **** } ! 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 } --- 361,375 ---- } ! if { $trequest > 0 } { ! set ov [expr $talloc - $trequest] ! set op [format %4.2f [expr $ov.0 * 100 / $trequest.0]] ! } ! if { $tops > 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 } *************** *** 409,413 **** "Tcl Library" [ns_info tcllib] \ Log [ns_info log] \ ! Version "[ns_info version] ([ns_info label])" \ "Build Date" [ns_info builddate] \ Servers [join [ns_info servers] <br>] \ --- 411,415 ---- "Tcl Library" [ns_info tcllib] \ Log [ns_info log] \ ! Version "[ns_info version]" \ "Build Date" [ns_info builddate] \ Servers [join [ns_info servers] <br>] \ |
From: Bernd E. <ei...@us...> - 2006-01-20 15:45:10
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19824 Modified Files: README Log Message: wrong spelling added by myself; fixed. Index: README =================================================================== RCS file: /cvsroot/naviserver/naviserver/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 20 Jan 2006 15:40:13 -0000 1.2 --- README 20 Jan 2006 15:44:55 -0000 1.3 *************** *** 25,29 **** http://sourceforge.net/projects/naviserver ! Another ressource is the NaviServer wiki: http://naviserver.sourceforge.net --- 25,29 ---- http://sourceforge.net/projects/naviserver ! Another resource is the NaviServer wiki: http://naviserver.sourceforge.net |
From: Bernd E. <ei...@us...> - 2006-01-20 15:40:27
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18417 Modified Files: README Log Message: ChangeLog Index: README =================================================================== RCS file: /cvsroot/naviserver/naviserver/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 16 Feb 2005 08:38:43 -0000 1.1.1.1 --- README 20 Jan 2006 15:40:13 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- 4. Mailing lists + 1. Introduction --------------- *************** *** 20,27 **** NaviServer is maintained, enhanced, and distributed freely by the open source community. The home for NaviServer sources and bug/patch ! database is localted on SourceForge site: http://sourceforge.net/projects/naviserver NaviServer is a freely available open source package. See the file "license.terms" for complete information. --- 21,32 ---- NaviServer is maintained, enhanced, and distributed freely by the open source community. The home for NaviServer sources and bug/patch ! database is located on SourceForge site: http://sourceforge.net/projects/naviserver + Another ressource is the NaviServer wiki: + + http://naviserver.sourceforge.net + NaviServer is a freely available open source package. See the file "license.terms" for complete information. *************** *** 33,37 **** Documentation will be available in the "doc" subdirectory. At this point the documentation is incomplete and is considered to be the ! work in progress. One done, it will be distributed in Unix nroff format (suitable for viewing with Unix "man" command) and HTML format (suitable for viewing with any HTML-compatible browser). --- 38,42 ---- Documentation will be available in the "doc" subdirectory. At this point the documentation is incomplete and is considered to be the ! work in progress. Once done, it will be distributed in Unix nroff format (suitable for viewing with Unix "man" command) and HTML format (suitable for viewing with any HTML-compatible browser). *************** *** 66,71 **** The following should work: ! % gunzip < naviserver-4.0.10.src.tar.gz | tar xvf - ! % cd naviserver-4.0.10 % ./configure % make install --- 71,76 ---- The following should work: ! % gunzip < naviserver-4.99.0.tar.gz | tar xvf - ! % cd naviserver-4.99.0 % ./configure % make install *************** *** 110,114 **** % cd /usr/local/ns ! % bin/nsd -ft nsd.tcl --- 115,119 ---- % cd /usr/local/ns ! % bin/nsd -f -t nsd.tcl *************** *** 117,121 **** There are mailing lists for NaviServer to discuss anything from ! configuration, development, and future direction. To join visit: http://sourceforge.net/projects/naviserver --- 122,126 ---- There are mailing lists for NaviServer to discuss anything from ! configuration, development, and future direction. To join visit: http://sourceforge.net/projects/naviserver |
From: Vlad S. <ser...@us...> - 2006-01-20 06:05:08
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29320/nsd Modified Files: driver.c Log Message: Index: driver.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/driver.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** driver.c 18 Jan 2006 17:17:35 -0000 1.36 --- driver.c 20 Jan 2006 06:04:59 -0000 1.37 *************** *** 1038,1044 **** * Queue the socket immediately if request is provided */ n = (*sockPtr->drvPtr->proc)(DriverAccept, (Ns_Sock*)sockPtr, 0, 0); ! if (n == NS_OK && sockPtr->reqPtr) { ! if (!SetServer(sockPtr)) { SockRelease(sockPtr, Reason_ServerReject, 0); } else { --- 1038,1045 ---- * Queue the socket immediately if request is provided */ + n = (*sockPtr->drvPtr->proc)(DriverAccept, (Ns_Sock*)sockPtr, 0, 0); ! if (n == NS_OK) { ! if (sockPtr->reqPtr == NULL || !SetServer(sockPtr)) { SockRelease(sockPtr, Reason_ServerReject, 0); } else { *************** *** 1048,1051 **** --- 1049,1053 ---- } } else { + /* * Put the socket on the read-ahead list. *************** *** 1534,1538 **** int len, nread, n; ! Ns_DriverSockRequest(sock, 0); /* --- 1536,1542 ---- int len, nread, n; ! if (Ns_DriverSockRequest(sock, 0) != NS_OK) { ! return NS_ERROR; ! } /* *************** *** 1846,1850 **** * * Results: ! * None. * * Side effects: --- 1850,1854 ---- * * Results: ! * NS_ERROR if request cannot be parsed. * * Side effects: *************** *** 1854,1858 **** */ ! void Ns_DriverSockRequest(Ns_Sock *sock, char *reqline) { --- 1858,1862 ---- */ ! int Ns_DriverSockRequest(Ns_Sock *sock, char *reqline) { *************** *** 1878,1889 **** reqPtr->leadblanks = 0; } ! sockPtr->reqPtr = reqPtr; ! reqPtr->port = ntohs(sockPtr->sa.sin_port); ! strcpy(reqPtr->peer, ns_inet_ntoa(sockPtr->sa.sin_addr)); ! if (reqline) { ! reqPtr->request = Ns_ParseRequest(reqline); } } } --- 1882,1899 ---- reqPtr->leadblanks = 0; } ! } ! sockPtr->reqPtr = reqPtr; ! reqPtr->port = ntohs(sockPtr->sa.sin_port); ! strcpy(reqPtr->peer, ns_inet_ntoa(sockPtr->sa.sin_addr)); ! if (reqline) { ! reqPtr->request = Ns_ParseRequest(reqline); ! if (reqPtr->request == NULL) { ! NsFreeRequest(reqPtr); ! sockPtr->reqPtr = NULL; ! return NS_ERROR; } } + return NS_OK; } |
From: Vlad S. <ser...@us...> - 2006-01-20 06:05:08
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29320 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.279 retrieving revision 1.280 diff -C2 -d -r1.279 -r1.280 *** ChangeLog 18 Jan 2006 19:47:53 -0000 1.279 --- ChangeLog 20 Jan 2006 06:04:59 -0000 1.280 *************** *** 1,2 **** --- 1,8 ---- + 2006-01-19 Vlad Seryakov <ser...@us...> + + * include/ns.h: + * nsd/driver.c: Fixed bug in Ns_DriverSockRequest when existing + structure is used. Returns NS_ERROR now if cannot parse given url. + 2006-01-18 Vlad Seryakov <ser...@us...> |
From: Vlad S. <ser...@us...> - 2006-01-20 06:05:08
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29320/include Modified Files: ns.h Log Message: Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** ns.h 13 Jan 2006 15:49:11 -0000 1.68 --- ns.h 20 Jan 2006 06:04:59 -0000 1.69 *************** *** 930,934 **** NS_EXTERN int Ns_DriverInit(char *server, char *module, Ns_DriverInitData *init); ! NS_EXTERN void Ns_DriverSockRequest(Ns_Sock *sock, char *reqline); /* --- 930,934 ---- NS_EXTERN int Ns_DriverInit(char *server, char *module, Ns_DriverInitData *init); ! NS_EXTERN int Ns_DriverSockRequest(Ns_Sock *sock, char *reqline); /* |
From: Vlad S. <ser...@us...> - 2006-01-20 06:05:08
|
Update of /cvsroot/naviserver/modules/nssmtpd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29320/modules/nssmtpd Modified Files: nssmtpd.c Log Message: Index: nssmtpd.c =================================================================== RCS file: /cvsroot/naviserver/modules/nssmtpd/nssmtpd.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** nssmtpd.c 20 Jan 2006 04:00:40 -0000 1.1.1.1 --- nssmtpd.c 20 Jan 2006 06:04:59 -0000 1.2 *************** *** 593,598 **** switch (cmd) { case DriverAccept: ! Ns_DriverSockRequest(sock, "SMTPD /"); ! return NS_OK; case DriverRecv: case DriverSend: --- 593,597 ---- switch (cmd) { case DriverAccept: ! return Ns_DriverSockRequest(sock, "SMTPD /"); case DriverRecv: case DriverSend: |
From: Bernd E. <ei...@us...> - 2006-01-19 17:14:45
|
Update of /cvsroot/naviserver/naviserver/doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3650/html Log Message: Directory /cvsroot/naviserver/naviserver/doc/html added to the repository |
From: Bernd E. <ei...@us...> - 2006-01-19 17:14:44
|
Update of /cvsroot/naviserver/naviserver/doc/man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3650/man Log Message: Directory /cvsroot/naviserver/naviserver/doc/man added to the repository |
From: Bernd E. <ei...@us...> - 2006-01-19 17:14:44
|
Update of /cvsroot/naviserver/naviserver/doc/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3650/src Log Message: Directory /cvsroot/naviserver/naviserver/doc/src added to the repository |
From: Vlad S. <ser...@us...> - 2006-01-19 01:35:34
|
Update of /cvsroot/naviserver/modules/nsffmpeg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21578/modules/nsffmpeg Modified Files: nsffmpeg.c Log Message: error handling and buffer allocation improved Index: nsffmpeg.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsffmpeg/nsffmpeg.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nsffmpeg.c 16 Jan 2006 19:30:49 -0000 1.3 --- nsffmpeg.c 19 Jan 2006 01:35:22 -0000 1.4 *************** *** 331,334 **** --- 331,335 ---- uint8_t *audio_buf; uint8_t *audio_out; + uint8_t *video_buf; int audio_out_size; uint8_t *input_tmp; *************** *** 701,704 **** --- 702,706 ---- av_free(avt->audio_device); av_free(avt->grab_device); + av_free(avt->video_buf); av_free(avt); } *************** *** 799,803 **** } pkt.flags |= PKT_FLAG_KEY; ! av_interleaved_write_frame(s, &pkt); ost->sync_opts += enc->frame_size; } --- 801,807 ---- } pkt.flags |= PKT_FLAG_KEY; ! if (av_interleaved_write_frame(s, &pkt) < 0) { ! return NS_ERROR; ! } ost->sync_opts += enc->frame_size; } *************** *** 839,843 **** } pkt.flags |= PKT_FLAG_KEY; ! av_interleaved_write_frame(s, &pkt); } return NS_OK; --- 843,849 ---- } pkt.flags |= PKT_FLAG_KEY; ! if (av_interleaved_write_frame(s, &pkt) < 0) { ! return NS_ERROR; ! } } return NS_OK; *************** *** 958,962 **** } } ! av_interleaved_write_frame(s, &pkt); } return NS_OK; --- 964,970 ---- } } ! if (av_interleaved_write_frame(s, &pkt) < 0) { ! return NS_ERROR; ! } } return NS_OK; *************** *** 968,972 **** AVFrame *final_picture, *formatted_picture; AVFrame picture_format_temp, picture_crop_temp, big_picture; - uint8_t *buf = NULL, *buf1 = NULL; AVCodecContext *enc, *dec; enum PixelFormat target_pixfmt; --- 976,979 ---- *************** *** 1010,1024 **** /* create temporary picture */ size = avpicture_get_size(target_pixfmt, dec->width, dec->height); ! buf = av_malloc(size); ! if (!buf) { return NS_ERROR; } formatted_picture = &picture_format_temp; ! avpicture_fill((AVPicture*)formatted_picture, buf, target_pixfmt, dec->width, dec->height); if (img_convert((AVPicture*)formatted_picture, target_pixfmt, (AVPicture *)in_picture, dec->pix_fmt, dec->width, dec->height) < 0) { if (avt->verbose >= 0) { Tcl_AppendResult(avt->interp, "pixel format conversion not handled", 0); } ! goto the_end; } } else { --- 1017,1031 ---- /* create temporary picture */ size = avpicture_get_size(target_pixfmt, dec->width, dec->height); ! avt->video_buf = av_realloc(avt->video_buf, size); ! if (!avt->video_buf) { return NS_ERROR; } formatted_picture = &picture_format_temp; ! avpicture_fill((AVPicture*)formatted_picture, avt->video_buf, target_pixfmt, dec->width, dec->height); if (img_convert((AVPicture*)formatted_picture, target_pixfmt, (AVPicture *)in_picture, dec->pix_fmt, dec->width, dec->height) < 0) { if (avt->verbose >= 0) { Tcl_AppendResult(avt->interp, "pixel format conversion not handled", 0); } ! return NS_ERROR; } } else { *************** *** 1034,1051 **** } if (enc->pix_fmt != PIX_FMT_YUV420P) { - av_free(buf); /* create temporary picture */ size = avpicture_get_size(enc->pix_fmt, enc->width, enc->height); ! buf = av_malloc(size); ! if (!buf) { return NS_ERROR; } final_picture = &picture_format_temp; ! avpicture_fill((AVPicture*)final_picture, buf, enc->pix_fmt, enc->width, enc->height); if (img_convert((AVPicture*)final_picture, enc->pix_fmt, (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P, enc->width, enc->height) < 0) { if (avt->verbose >= 0) { Tcl_AppendResult(avt->interp, "pixel format conversion not handled", 0); } ! goto the_end; } } --- 1041,1057 ---- } if (enc->pix_fmt != PIX_FMT_YUV420P) { /* create temporary picture */ size = avpicture_get_size(enc->pix_fmt, enc->width, enc->height); ! avt->video_buf = av_realloc(avt->video_buf, size); ! if (!avt->video_buf) { return NS_ERROR; } final_picture = &picture_format_temp; ! avpicture_fill((AVPicture*)final_picture, avt->video_buf, enc->pix_fmt, enc->width, enc->height); if (img_convert((AVPicture*)final_picture, enc->pix_fmt, (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P, enc->width, enc->height) < 0) { if (avt->verbose >= 0) { Tcl_AppendResult(avt->interp, "pixel format conversion not handled", 0); } ! return NS_ERROR; } } *************** *** 1079,1096 **** av_fill_pad_region(avt, (AVPicture*)final_picture, enc->height, enc->width, ost->padtop, ost->padbottom, ost->padleft, ost->padright, avt->padcolor); if (enc->pix_fmt != PIX_FMT_YUV420P) { - av_free(buf); /* create temporary picture */ size = avpicture_get_size(enc->pix_fmt, enc->width, enc->height); ! buf = av_malloc(size); ! if (!buf) { return NS_ERROR; } final_picture = &picture_format_temp; ! avpicture_fill((AVPicture*)final_picture, buf, enc->pix_fmt, enc->width, enc->height); if (img_convert((AVPicture*)final_picture, enc->pix_fmt, (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P, enc->width, enc->height) < 0) { if (avt->verbose >= 0) { Tcl_AppendResult(avt->interp, "pixel format conversion not handled", 0); } ! goto the_end; } } --- 1085,1101 ---- av_fill_pad_region(avt, (AVPicture*)final_picture, enc->height, enc->width, ost->padtop, ost->padbottom, ost->padleft, ost->padright, avt->padcolor); if (enc->pix_fmt != PIX_FMT_YUV420P) { /* create temporary picture */ size = avpicture_get_size(enc->pix_fmt, enc->width, enc->height); ! avt->video_buf = av_realloc(avt->video_buf, size); ! if (!avt->video_buf) { return NS_ERROR; } final_picture = &picture_format_temp; ! avpicture_fill((AVPicture*)final_picture, avt->video_buf, enc->pix_fmt, enc->width, enc->height); if (img_convert((AVPicture*)final_picture, enc->pix_fmt, (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P, enc->width, enc->height) < 0) { if (avt->verbose >= 0) { Tcl_AppendResult(avt->interp, "pixel format conversion not handled", 0); } ! return NS_ERROR; } } *************** *** 1115,1119 **** pkt.flags |= PKT_FLAG_KEY; } ! av_interleaved_write_frame(s, &pkt); enc->coded_frame = old_frame; } else { --- 1120,1126 ---- pkt.flags |= PKT_FLAG_KEY; } ! if (av_interleaved_write_frame(s, &pkt) < 0) { ! return NS_ERROR; ! } enc->coded_frame = old_frame; } else { *************** *** 1148,1152 **** pkt.flags |= PKT_FLAG_KEY; } ! av_interleaved_write_frame(s, &pkt); *frame_size = ret; /* if two pass, output log */ --- 1155,1161 ---- pkt.flags |= PKT_FLAG_KEY; } ! if (av_interleaved_write_frame(s, &pkt) < 0) { ! return NS_ERROR; ! } *frame_size = ret; /* if two pass, output log */ *************** *** 1159,1165 **** ost->frame_number++; } - the_end: - av_free(buf); - av_free(buf1); return NS_OK; } --- 1168,1171 ---- *************** *** 1453,1457 **** opkt.destruct = av_destruct_packet; } ! av_interleaved_write_frame(os, &opkt); ost->st->codec->frame_number++; ost->frame_number++; --- 1459,1465 ---- opkt.destruct = av_destruct_packet; } ! if (av_interleaved_write_frame(os, &opkt) < 0) { ! goto fail_decode; ! } ost->st->codec->frame_number++; ost->frame_number++; *************** *** 1521,1525 **** pkt.pts = av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base); } ! av_interleaved_write_frame(os, &pkt); } } --- 1529,1535 ---- pkt.pts = av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base); } ! if (av_interleaved_write_frame(os, &pkt) < 0) { ! goto fail_decode; ! } } } |
From: Vlad S. <ser...@us...> - 2006-01-18 20:19:27
|
Update of /cvsroot/naviserver/modules/nsffmpeg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1476/modules/nsffmpeg Modified Files: ffmpeg.tcl Log Message: Index: ffmpeg.tcl =================================================================== RCS file: /cvsroot/naviserver/modules/nsffmpeg/ffmpeg.tcl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ffmpeg.tcl 16 Jan 2006 03:44:30 -0000 1.1.1.1 --- ffmpeg.tcl 18 Jan 2006 20:19:17 -0000 1.2 *************** *** 8,12 **** # For naviserver module mode, automatic conversion of any video into flash ! # to be played with flash videoplayer # # html page looks like this: --- 8,13 ---- # For naviserver module mode, automatic conversion of any video into flash ! # to be played with flash videoplayer from ! # http://www.jeroenwijering.com/?item=Flash_Video_Player # # html page looks like this: *************** *** 24,27 **** ns_write "HTTP/1.0 200 OK\r\nContent-Type: video/mpeg\r\n\r\n" ! ns_ffmpeg transcode -i /home/vlad/src/lmbox/data/Clips/Kick.mpg -f flv conn: } --- 25,28 ---- ns_write "HTTP/1.0 200 OK\r\nContent-Type: video/mpeg\r\n\r\n" ! ns_ffmpeg transcode -i /dev/video0 -f flv conn: } |
From: Vlad S. <ser...@us...> - 2006-01-18 19:48:06
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23546 Modified Files: ChangeLog sample-config.tcl Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.278 retrieving revision 1.279 diff -C2 -d -r1.278 -r1.279 *** ChangeLog 18 Jan 2006 17:17:35 -0000 1.278 --- ChangeLog 18 Jan 2006 19:47:53 -0000 1.279 *************** *** 1,4 **** --- 1,5 ---- 2006-01-18 Vlad Seryakov <ser...@us...> + * sample-config.tcl: Added spooler/writer related options * nsd/driver.c: * nsd/nsd.h: Rewrote driver's spooler/writer support Index: sample-config.tcl =================================================================== RCS file: /cvsroot/naviserver/naviserver/sample-config.tcl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sample-config.tcl 19 Jun 2005 16:33:20 -0000 1.5 --- sample-config.tcl 18 Jan 2006 19:47:53 -0000 1.6 *************** *** 204,213 **** # ns_section "ns/server/${servername}/module/nssock" ! ns_param port $httpport ! ns_param hostname $hostname ! ns_param address $address ! #ns_param maxinput 1024000 ;# Max upload size ! #ns_param maxline 4096 ;# Max line size ! #ns_param bufsize 16000 ;# Read-ahead buffer size # --- 204,220 ---- # ns_section "ns/server/${servername}/module/nssock" ! ns_param port $httpport ! ns_param hostname $hostname ! ns_param address $address ! ! #ns_param maxinput 1024000 ;# Max upload size ! #ns_param maxline 4096 ;# Max line size ! #ns_param bufsize 16384 ;# Read-ahead buffer size ! ! #ns_param readahead 16384 ;# Max upload size when to use spooler ! #ns_param uploadsize 2048 ;# Max upload size when to use statistics ! #ns_param spoolerthreads 1 ;# Number of spooler threads ! #ns_param writerthreads 0 ;# Number of writer threads ! #ns_param writersize 1048576 ;# Number of writer threads # |
From: Vlad S. <ser...@us...> - 2006-01-18 17:17:44
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22395/nsd Modified Files: driver.c nsd.h Log Message: See ChangeLog Index: driver.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/driver.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** driver.c 18 Jan 2006 03:02:27 -0000 1.35 --- driver.c 18 Jan 2006 17:17:35 -0000 1.36 *************** *** 82,115 **** } ServerMap; - static Tcl_HashTable uploadTable; /* Hash table of uploads. */ - static Ns_Mutex uploadLock; /* Lock around upload table. */ - - /* - * The following maintains writer threads and sockets to be written to the clients - */ - - typedef struct WriterSock { - struct WriterSock *nextPtr; - Sock *sockPtr; - int fd; - int nread; - int nsend; - int flags; - int bufsize; - char buf[2048]; - } WriterSock; - - typedef struct WriterQueue { - struct WriterQueue *nextPtr; - WriterSock *sockPtr; /* List of spooled Sock structures. */ - SOCKET pipe[2]; /* Trigger to wakeup SpoolThread. */ - Ns_Mutex lock; /* Lock around spooled list. */ - Ns_Cond cond; /* Cond for stopped flag. */ - Ns_Thread thread; /* Running SpoolThread. */ - int stopped; /* Flag to indicate writer thread stopped. */ - int shutdown; /* Flag to indicate shutdown. */ - int id; - } WriterQueue; - /* * Static functions defined in this file. --- 82,85 ---- *************** *** 117,121 **** static Ns_ThreadProc DriverThread; ! static Ns_ThreadProc SpoolThread; static Ns_ThreadProc WriterThread; static int SetServer(Sock *sockPtr); --- 87,91 ---- static Ns_ThreadProc DriverThread; ! static Ns_ThreadProc SpoolerThread; static Ns_ThreadProc WriterThread; static int SetServer(Sock *sockPtr); *************** *** 130,135 **** static int SockParse(Sock *sockPtr, int spooler); ! static int SockSpoolerPush(Sock *sockPtr); ! static Sock *SockSpoolerPop(void); static void SockWriterRelease(WriterSock *sockPtr, ReleaseReasons reason, int err); --- 100,105 ---- static int SockParse(Sock *sockPtr, int spooler); ! static int SockSpoolerPush(Driver *drvPtr, Sock *sockPtr); ! static Sock *SockSpoolerPop(SpoolerQueue *queuePtr); static void SockWriterRelease(WriterSock *sockPtr, ReleaseReasons reason, int err); *************** *** 157,174 **** static Sock *firstClosePtr; /* First conn ready for graceful close. */ - static SOCKET spoolerPipe[2]; /* Trigger to wakeup SpoolThread. */ - static Ns_Mutex spoolerLock; /* Lock around spooled list. */ - static Ns_Cond spoolerCond; /* Cond for stopped flag. */ - static Ns_Thread spoolerThread; /* Running SpoolThread. */ - static int spoolerStopped = 0; /* Flag to indicate spooler thread stopped. */ - static int spoolerShutdown = 0; /* Flag to indicate shutdown. */ - static int spoolerDisabled = 0; /* Flag to enable/disable the upload spooler. */ - static Sock *spoolerSockPtr = NULL; /* List of spooled Sock structures. */ - - static Ns_Mutex writerLock; /* Lock around writer queues. */ - static int writerThreads = 0; /* Number of writer threads to run. */ - static WriterQueue *firstQueuePtr = NULL; /* List of writer threads. */ - static WriterQueue *curQueuePtr = NULL; /* Current writer thread */ - #define Push(x, xs) ((x)->nextPtr = (xs), (xs) = (x)) --- 127,130 ---- *************** *** 194,200 **** { Tcl_InitHashTable(&hosts, TCL_STRING_KEYS); - Ns_MutexInit(&uploadLock); Ns_MutexSetName(&drvLock, "ns:upload"); - Tcl_InitHashTable(&uploadTable, TCL_STRING_KEYS); } --- 150,154 ---- *************** *** 339,343 **** drvPtr->readahead = Ns_ConfigIntRange(path, "readahead", drvPtr->bufsize, drvPtr->bufsize, drvPtr->maxinput); - drvPtr->uploadsize = Ns_ConfigIntRange(path, "uploadsize", 2048, 1024, INT_MAX); drvPtr->sndbuf = Ns_ConfigIntRange(path, "sndbuf", 0, 0, INT_MAX); drvPtr->rcvbuf = Ns_ConfigIntRange(path, "rcvbuf", 0, 0, INT_MAX); --- 293,296 ---- *************** *** 405,412 **** */ ! if (!Ns_ConfigBool(path, "spooler", NS_TRUE)) { ! spoolerDisabled = 1; ! } else { ! Ns_Log(Notice, "%s: enable spooler thread for uploads >= %d bytes", module, drvPtr->uploadsize); } --- 358,371 ---- */ ! drvPtr->spooler.threads = Ns_ConfigIntRange(path, "spoolerthreads", 1, 0, 32); ! if (drvPtr->spooler.threads > 0) {; ! drvPtr->spooler.uploadsize = Ns_ConfigIntRange(path, "uploadsize", 2048, 1024, INT_MAX); ! Tcl_InitHashTable(&drvPtr->spooler.table, TCL_STRING_KEYS); ! Ns_Log(Notice, "%s: enable %d spooler thread(s) for uploads >= %d bytes", module, drvPtr->spooler.threads, drvPtr->readahead); ! for (i = 0; i < drvPtr->spooler.threads; i++) { ! SpoolerQueue *queuePtr = ns_calloc(1, sizeof(SpoolerQueue)); ! queuePtr->id = i; ! Push(queuePtr, drvPtr->spooler.firstPtr); ! } } *************** *** 415,426 **** */ ! writerThreads = Ns_ConfigIntRange(path, "writerthreads", 0, 0, 32); ! if (writerThreads > 0) { ! drvPtr->writersize = Ns_ConfigIntRange(path, "writersize", 1024*1024, 1024*1024, INT_MAX); ! Ns_Log(Notice, "%s: enable %d writer thread(s) for downloads >= %d bytes", module, writerThreads, drvPtr->writersize); ! for (i = 0; i < writerThreads; i++) { ! WriterQueue *queuePtr = ns_calloc(1, sizeof(WriterQueue)); queuePtr->id = i; ! Push(queuePtr, firstQueuePtr); } } --- 374,385 ---- */ ! drvPtr->writer.threads = Ns_ConfigIntRange(path, "writerthreads", 0, 0, 32); ! if (drvPtr->writer.threads > 0) { ! drvPtr->writer.maxsize = Ns_ConfigIntRange(path, "writersize", 1024*1024, 1024*1024, INT_MAX); ! Ns_Log(Notice, "%s: enable %d writer thread(s) for downloads >= %d bytes", module, drvPtr->writer.threads, drvPtr->writer.maxsize); ! for (i = 0; i < drvPtr->writer.threads; i++) { ! SpoolerQueue *queuePtr = ns_calloc(1, sizeof(SpoolerQueue)); queuePtr->id = i; ! Push(queuePtr, drvPtr->writer.firstPtr); } } *************** *** 492,496 **** { Driver *drvPtr; ! WriterQueue *queuePtr; /* --- 451,455 ---- { Driver *drvPtr; ! SpoolerQueue *queuePtr; /* *************** *** 516,519 **** --- 475,504 ---- Ns_Log(Notice, "%s: listening on %s:%d", drvPtr->name, drvPtr->address, drvPtr->port); + + /* + * Create the spooler thread(s). + */ + + queuePtr = drvPtr->spooler.firstPtr; + while (queuePtr) { + if (ns_sockpair(queuePtr->pipe) != 0) { + Ns_Fatal("driver: ns_sockpair() failed: %s", ns_sockstrerror(ns_sockerrno)); + } + Ns_ThreadCreate(SpoolerThread, queuePtr, 0, &queuePtr->thread); + queuePtr = queuePtr->nextPtr; + } + + /* + * Create the writer thread(s) + */ + + queuePtr = drvPtr->writer.firstPtr; + while (queuePtr) { + if (ns_sockpair(queuePtr->pipe) != 0) { + Ns_Fatal("driver: ns_sockpair() failed: %s", ns_sockstrerror(ns_sockerrno)); + } + Ns_ThreadCreate(WriterThread, queuePtr, 0, &queuePtr->thread); + queuePtr = queuePtr->nextPtr; + } } drvPtr = drvPtr->nextPtr; *************** *** 526,531 **** if (firstDrvPtr != NULL) { if (ns_sockpair(drvPipe) != 0) { ! Ns_Fatal("driver: ns_sockpair() failed: %s", ! ns_sockstrerror(ns_sockerrno)); } Ns_ThreadCreate(DriverThread, NULL, 0, &driverThread); --- 511,515 ---- if (firstDrvPtr != NULL) { if (ns_sockpair(drvPipe) != 0) { ! Ns_Fatal("driver: ns_sockpair() failed: %s", ns_sockstrerror(ns_sockerrno)); } Ns_ThreadCreate(DriverThread, NULL, 0, &driverThread); *************** *** 533,562 **** Ns_Log(Warning, "no communication drivers configured"); } - - /* - * Create the spooler thread. - */ - - if (spoolerDisabled == 0) { - if (ns_sockpair(spoolerPipe) != 0) { - Ns_Fatal("driver: ns_sockpair() failed: %s", - ns_sockstrerror(ns_sockerrno)); - } - Ns_ThreadCreate(SpoolThread, NULL, 0, &spoolerThread); - } - - /* - * Create the writer thread(s) - */ - - queuePtr = firstQueuePtr; - while (queuePtr) { - if (ns_sockpair(queuePtr->pipe) != 0) { - Ns_Fatal("driver: ns_sockpair() failed: %s", - ns_sockstrerror(ns_sockerrno)); - } - Ns_ThreadCreate(WriterThread, queuePtr, 0, &queuePtr->thread); - queuePtr = queuePtr->nextPtr; - } } --- 517,520 ---- *************** *** 582,586 **** NsStopDrivers(void) { ! WriterQueue *queuePtr; Ns_MutexLock(&drvLock); --- 540,546 ---- NsStopDrivers(void) { ! int i; ! Driver *drvPtr; ! SpoolerQueue *queuePtr, *queueList[2]; Ns_MutexLock(&drvLock); *************** *** 592,615 **** Ns_MutexUnlock(&drvLock); ! if (!spoolerDisabled) { ! Ns_MutexLock(&spoolerLock); ! if (!spoolerStopped && !spoolerShutdown) { ! Ns_Log(Notice, "spooler: triggering shutdown"); ! spoolerShutdown = 1; ! SockTrigger(spoolerPipe[1]); ! } ! Ns_MutexUnlock(&spoolerLock); ! } ! queuePtr = firstQueuePtr; ! while (queuePtr) { ! Ns_MutexLock(&queuePtr->lock); ! if (!queuePtr->stopped && !queuePtr->shutdown) { ! Ns_Log(Notice, "writer: %d: triggering shutdown", queuePtr->id); ! queuePtr->shutdown = 1; ! SockTrigger(queuePtr->pipe[1]); } ! Ns_MutexUnlock(&queuePtr->lock); ! queuePtr = queuePtr->nextPtr; } } --- 552,577 ---- Ns_MutexUnlock(&drvLock); ! /* ! * Shutdown all spooler and writer threads ! */ ! drvPtr = firstDrvPtr; ! while (drvPtr != NULL) { ! queueList[0] = drvPtr->writer.firstPtr; ! queueList[1] = drvPtr->spooler.firstPtr; ! for (i = 0; i < 2; i++) { ! queuePtr = queueList[i]; ! while (queuePtr) { ! Ns_MutexLock(&queuePtr->lock); ! if (!queuePtr->stopped && !queuePtr->shutdown) { ! Ns_Log(Notice, "%s%d: triggering shutdown", (i ? "spooler" : "writer"), queuePtr->id); ! queuePtr->shutdown = 1; ! SockTrigger(queuePtr->pipe[1]); ! } ! Ns_MutexUnlock(&queuePtr->lock); ! queuePtr = queuePtr->nextPtr; ! } } ! drvPtr = drvPtr->nextPtr; } } *************** *** 636,643 **** NsWaitDriversShutdown(Ns_Time *toPtr) { ! int status = NS_OK; Tcl_HashEntry *hPtr; Tcl_HashSearch search; ! WriterQueue *queuePtr; Ns_MutexLock(&drvLock); --- 598,606 ---- NsWaitDriversShutdown(Ns_Time *toPtr) { ! int i, status = NS_OK; ! Driver *drvPtr; Tcl_HashEntry *hPtr; Tcl_HashSearch search; ! SpoolerQueue *queuePtr, *queueList[2]; Ns_MutexLock(&drvLock); *************** *** 660,704 **** } ! if (!spoolerDisabled) { ! status = NS_OK; ! Ns_MutexLock(&spoolerLock); ! while (!spoolerStopped && status == NS_OK) { ! status = Ns_CondTimedWait(&spoolerCond, &spoolerLock, toPtr); ! } ! Ns_MutexUnlock(&spoolerLock); ! if (status != NS_OK) { ! Ns_Log(Warning, "spooler: timeout waiting for shutdown"); ! } else { ! Ns_Log(Notice, "spooler: shutdown complete"); ! spoolerThread = NULL; ! ns_sockclose(spoolerPipe[0]); ! ns_sockclose(spoolerPipe[1]); ! Ns_MutexLock(&uploadLock); ! hPtr = Tcl_FirstHashEntry(&uploadTable, &search); ! while (hPtr != NULL) { ! Tcl_DeleteHashEntry(hPtr); ! hPtr = Tcl_NextHashEntry(&search); ! } ! Ns_MutexUnlock(&uploadLock); ! } ! } ! queuePtr = firstQueuePtr; ! while (queuePtr) { ! status = NS_OK; ! Ns_MutexLock(&queuePtr->lock); ! while (!queuePtr->stopped && status == NS_OK) { ! status = Ns_CondTimedWait(&queuePtr->cond, &queuePtr->lock, toPtr); ! } ! Ns_MutexUnlock(&queuePtr->lock); ! if (status != NS_OK) { ! Ns_Log(Warning, "writer%d: timeout waiting for shutdown", queuePtr->id); ! } else { ! Ns_Log(Notice, "writer%d: shutdown complete", queuePtr->id); ! queuePtr->thread = NULL; ! ns_sockclose(queuePtr->pipe[0]); ! ns_sockclose(queuePtr->pipe[1]); } ! queuePtr = queuePtr->nextPtr; } } --- 623,655 ---- } ! /* ! * Wait for shutdown of all spooler and writer threads ! */ ! drvPtr = firstDrvPtr; ! while (drvPtr != NULL) { ! queueList[0] = drvPtr->writer.firstPtr; ! queueList[1] = drvPtr->spooler.firstPtr; ! for (i = 0; i < 2; i++) { ! queuePtr = queueList[i]; ! while (queuePtr) { ! status = NS_OK; ! Ns_MutexLock(&queuePtr->lock); ! while (!queuePtr->stopped && status == NS_OK) { ! status = Ns_CondTimedWait(&queuePtr->cond, &queuePtr->lock, toPtr); ! } ! Ns_MutexUnlock(&queuePtr->lock); ! if (status != NS_OK) { ! Ns_Log(Warning, "%s%d: timeout waiting for shutdown", (i ? "spooler" : "writer"), queuePtr->id); ! } else { ! Ns_Log(Notice, "%s%d: shutdown complete", (i ? "spooler" : "writer"), queuePtr->id); ! queuePtr->thread = NULL; ! ns_sockclose(queuePtr->pipe[0]); ! ns_sockclose(queuePtr->pipe[1]); ! } ! queuePtr = queuePtr->nextPtr; ! } } ! drvPtr = drvPtr->nextPtr; } } *************** *** 873,879 **** int n, stopping, pollto; Sock *sockPtr, *closePtr, *nextPtr, *waitPtr, *readPtr; - Driver *activeDrvPtr; - Driver *drvPtr, *nextDrvPtr, *idleDrvPtr, *acceptDrvPtr; Ns_Time timeout, now, diff; unsigned int nfds; /* Number of Sock to poll(). */ unsigned int maxfds; /* Max pollfd's in pfds. */ --- 824,829 ---- int n, stopping, pollto; Sock *sockPtr, *closePtr, *nextPtr, *waitPtr, *readPtr; Ns_Time timeout, now, diff; + Driver *drvPtr; unsigned int nfds; /* Number of Sock to poll(). */ unsigned int maxfds; /* Max pollfd's in pfds. */ *************** *** 885,905 **** /* - * Build up the list of active drivers. - */ - - activeDrvPtr = NULL; - drvPtr = firstDrvPtr; - firstDrvPtr = NULL; - while (drvPtr != NULL) { - nextDrvPtr = drvPtr->nextPtr; - if (drvPtr->sock != INVALID_SOCKET) { - Push(drvPtr, activeDrvPtr); - } else { - Push(drvPtr, firstDrvPtr); - } - drvPtr = nextDrvPtr; - } - - /* * Loop forever until signalled to shutdown and all * connections are complete and gracefully closed. --- 835,838 ---- *************** *** 924,933 **** nfds = 1; if (waitPtr == NULL) { ! drvPtr = activeDrvPtr; while (drvPtr != NULL) { ! pfds[nfds].fd = drvPtr->sock; ! pfds[nfds].events = POLLIN; ! drvPtr->pidx = nfds++; ! drvPtr = drvPtr->nextPtr; } } --- 857,868 ---- nfds = 1; if (waitPtr == NULL) { ! drvPtr = firstDrvPtr; while (drvPtr != NULL) { ! if (drvPtr->sock != INVALID_SOCKET) { ! pfds[nfds].fd = drvPtr->sock; ! pfds[nfds].events = POLLIN; ! drvPtr->pidx = nfds++; ! drvPtr = drvPtr->nextPtr; ! } } } *************** *** 1036,1040 **** switch (n) { case SOCK_SPOOL: ! if (!SockSpoolerPush(sockPtr)) { Push(sockPtr, readPtr); } --- 971,975 ---- switch (n) { case SOCK_SPOOL: ! if (!SockSpoolerPush(sockPtr->drvPtr, sockPtr)) { Push(sockPtr, readPtr); } *************** *** 1095,1120 **** if (waitPtr == NULL) { ! drvPtr = activeDrvPtr; ! activeDrvPtr = idleDrvPtr = acceptDrvPtr = NULL; while (drvPtr != NULL) { ! nextDrvPtr = drvPtr->nextPtr; ! if (waitPtr != NULL ! || (!(pfds[drvPtr->pidx].revents & POLLIN)) ! || ((sockPtr = SockAccept(drvPtr)) == NULL)) { ! ! /* ! * Add this driver to the temporary idle list. ! */ ! ! Push(drvPtr, idleDrvPtr); ! ! ! } else { ! ! /* ! * Add this driver to the temporary accepted list. ! */ ! ! Push(drvPtr, acceptDrvPtr); /* --- 1030,1037 ---- if (waitPtr == NULL) { ! drvPtr = firstDrvPtr; while (drvPtr != NULL) { ! if ((pfds[drvPtr->pidx].revents & POLLIN) && ! (sockPtr = SockAccept(drvPtr)) != NULL) { /* *************** *** 1139,1158 **** } } ! drvPtr = nextDrvPtr; ! } ! ! /* ! * Put the active driver list back together with the idle ! * drivers first but otherwise in the original order. This ! * should ensure round-robin service of the drivers. ! */ ! ! while ((drvPtr = acceptDrvPtr) != NULL) { ! acceptDrvPtr = drvPtr->nextPtr; ! Push(drvPtr, activeDrvPtr); ! } ! while ((drvPtr = idleDrvPtr) != NULL) { ! idleDrvPtr = drvPtr->nextPtr; ! Push(drvPtr, activeDrvPtr); } } --- 1056,1060 ---- } } ! drvPtr = drvPtr->nextPtr; } } *************** *** 1196,1206 **** if (stopping) { ! while ((drvPtr = activeDrvPtr) != NULL) { ! activeDrvPtr = drvPtr->nextPtr; if (drvPtr->sock != INVALID_SOCKET) { ns_sockclose(drvPtr->sock); drvPtr->sock = INVALID_SOCKET; } ! Push(drvPtr, firstDrvPtr); } } --- 1098,1108 ---- if (stopping) { ! drvPtr = firstDrvPtr; ! while (drvPtr != NULL) { if (drvPtr->sock != INVALID_SOCKET) { ns_sockclose(drvPtr->sock); drvPtr->sock = INVALID_SOCKET; } ! drvPtr = drvPtr->nextPtr; } } *************** *** 1583,1592 **** if (sockPtr->upload.url != NULL) { Ns_Log(Debug, "upload stats deleted: %s, %lu %lu", sockPtr->upload.url, sockPtr->upload.length, sockPtr->upload.size); ! Ns_MutexLock(&uploadLock); ! hPtr = Tcl_FindHashEntry(&uploadTable, sockPtr->upload.url); if (hPtr != NULL) { Tcl_DeleteHashEntry(hPtr); } ! Ns_MutexUnlock(&uploadLock); ns_free(sockPtr->upload.url); sockPtr->upload.url = NULL; --- 1485,1494 ---- if (sockPtr->upload.url != NULL) { Ns_Log(Debug, "upload stats deleted: %s, %lu %lu", sockPtr->upload.url, sockPtr->upload.length, sockPtr->upload.size); ! Ns_MutexLock(&sockPtr->drvPtr->spooler.lock); ! hPtr = Tcl_FindHashEntry(&sockPtr->drvPtr->spooler.table, sockPtr->upload.url); if (hPtr != NULL) { Tcl_DeleteHashEntry(hPtr); } ! Ns_MutexUnlock(&sockPtr->drvPtr->spooler.lock); ns_free(sockPtr->upload.url); sockPtr->upload.url = NULL; *************** *** 1676,1680 **** */ ! if (spooler == 0 && spoolerDisabled == 0) { return SOCK_SPOOL; } --- 1578,1582 ---- */ ! if (spooler == 0 && sockPtr->drvPtr->spooler.threads > 0) { return SOCK_SPOOL; } *************** *** 1911,1915 **** if (sockPtr->upload.url == NULL) { ! if (reqPtr->length > 0 && reqPtr->avail > sockPtr->drvPtr->uploadsize) { Tcl_HashEntry *hPtr; Ns_Request *req = reqPtr->request; --- 1813,1817 ---- if (sockPtr->upload.url == NULL) { ! if (reqPtr->length > 0 && reqPtr->avail > sockPtr->drvPtr->spooler.uploadsize) { Tcl_HashEntry *hPtr; Ns_Request *req = reqPtr->request; *************** *** 1919,1933 **** sockPtr->upload.length = reqPtr->length; sockPtr->upload.size = reqPtr->avail; ! Ns_MutexLock(&uploadLock); ! hPtr = Tcl_CreateHashEntry(&uploadTable, sockPtr->upload.url, &cnt); Tcl_SetHashValue(hPtr, sockPtr); ! Ns_MutexUnlock(&uploadLock); Ns_Log(Debug, "upload stats created for %s", sockPtr->upload.url); } } else { ! Ns_MutexLock(&uploadLock); sockPtr->upload.length = reqPtr->length; sockPtr->upload.size = reqPtr->avail; ! Ns_MutexUnlock(&uploadLock); } --- 1821,1835 ---- sockPtr->upload.length = reqPtr->length; sockPtr->upload.size = reqPtr->avail; ! Ns_MutexLock(&sockPtr->drvPtr->spooler.lock); ! hPtr = Tcl_CreateHashEntry(&sockPtr->drvPtr->spooler.table, sockPtr->upload.url, &cnt); Tcl_SetHashValue(hPtr, sockPtr); ! Ns_MutexUnlock(&sockPtr->drvPtr->spooler.lock); Ns_Log(Debug, "upload stats created for %s", sockPtr->upload.url); } } else { ! Ns_MutexLock(&sockPtr->drvPtr->spooler.lock); sockPtr->upload.length = reqPtr->length; sockPtr->upload.size = reqPtr->avail; ! Ns_MutexUnlock(&sockPtr->drvPtr->spooler.lock); } *************** *** 1992,1995 **** --- 1894,1898 ---- Tcl_HashEntry *hPtr; Sock *sockPtr; + Driver *drvPtr; if (objc != 2) { *************** *** 1998,2008 **** } ! Ns_MutexLock(&uploadLock); ! hPtr = Tcl_FindHashEntry(&uploadTable, Tcl_GetString(objv[1])); ! if (hPtr != NULL) { ! sockPtr = Tcl_GetHashValue(hPtr); ! sprintf(buf, "%lu %lu", sockPtr->upload.length, sockPtr->upload.size); } - Ns_MutexUnlock(&uploadLock); Tcl_AppendResult(interp, buf, NULL); return NS_OK; --- 1901,1916 ---- } ! drvPtr = firstDrvPtr; ! while (drvPtr != NULL) { ! Ns_MutexLock(&drvPtr->spooler.lock); ! hPtr = Tcl_FindHashEntry(&drvPtr->spooler.table, Tcl_GetString(objv[1])); ! if (hPtr != NULL) { ! sockPtr = Tcl_GetHashValue(hPtr); ! sprintf(buf, "%lu %lu", sockPtr->upload.length, sockPtr->upload.size); ! break; ! } ! Ns_MutexUnlock(&drvPtr->spooler.lock); ! drvPtr = drvPtr->nextPtr; } Tcl_AppendResult(interp, buf, NULL); return NS_OK; *************** *** 2029,2034 **** static void ! SpoolThread(void *ignored) { char c; int n, stopping, pollto; --- 1937,1943 ---- static void ! SpoolerThread(void *arg) { + SpoolerQueue *queuePtr = (SpoolerQueue*)arg; char c; int n, stopping, pollto; *************** *** 2038,2042 **** struct pollfd *pfds; ! Ns_ThreadSetName("-spooler-"); /* --- 1947,1951 ---- struct pollfd *pfds; ! Ns_ThreadSetName("-spooler%d-", queuePtr->id); /* *************** *** 2045,2049 **** */ ! Ns_Log(Notice, "spooler: accepting connections"); waitPtr = readPtr = NULL; Ns_GetTime(&now); --- 1954,1958 ---- */ ! Ns_Log(Notice, "spooler%d: accepting connections", queuePtr->id); waitPtr = readPtr = NULL; Ns_GetTime(&now); *************** *** 2051,2055 **** maxfds = 100; pfds = ns_malloc(maxfds * sizeof(struct pollfd)); ! pfds[0].fd = spoolerPipe[0]; pfds[0].events = POLLIN; --- 1960,1964 ---- maxfds = 100; pfds = ns_malloc(maxfds * sizeof(struct pollfd)); ! pfds[0].fd = queuePtr->pipe[0]; pfds[0].events = POLLIN; *************** *** 2097,2101 **** ns_sockstrerror(ns_sockerrno)); } ! if ((pfds[0].revents & POLLIN) && recv(spoolerPipe[0], &c, 1, 0) != 1) { Ns_Fatal("spooler: trigger recv() failed: %s", ns_sockstrerror(ns_sockerrno)); --- 2006,2010 ---- ns_sockstrerror(ns_sockerrno)); } ! if ((pfds[0].revents & POLLIN) && recv(queuePtr->pipe[0], &c, 1, 0) != 1) { Ns_Fatal("spooler: trigger recv() failed: %s", ns_sockstrerror(ns_sockerrno)); *************** *** 2178,2182 **** */ ! if (waitPtr == NULL && ((sockPtr = SockSpoolerPop()))) { SockTimeout(sockPtr, &now, sockPtr->drvPtr->recvwait); Push(sockPtr, readPtr); --- 2087,2091 ---- */ ! if (waitPtr == NULL && ((sockPtr = SockSpoolerPop(queuePtr)))) { SockTimeout(sockPtr, &now, sockPtr->drvPtr->recvwait); Push(sockPtr, readPtr); *************** *** 2187,2212 **** */ ! Ns_MutexLock(&spoolerLock); ! stopping = spoolerShutdown; ! Ns_MutexUnlock(&spoolerLock); } Ns_Log(Notice, "exiting"); ! Ns_MutexLock(&spoolerLock); ! spoolerStopped = 1; ! Ns_CondBroadcast(&spoolerCond); ! Ns_MutexUnlock(&spoolerLock); } static int ! SockSpoolerPush(Sock *sockPtr) { int trigger = 0; ! Ns_MutexLock(&spoolerLock); ! if (spoolerSockPtr == NULL) { trigger = 1; } ! Push(sockPtr, spoolerSockPtr); ! Ns_MutexUnlock(&spoolerLock); /* --- 2096,2135 ---- */ ! Ns_MutexLock(&queuePtr->lock); ! stopping = queuePtr->shutdown; ! Ns_MutexUnlock(&queuePtr->lock); } Ns_Log(Notice, "exiting"); ! Ns_MutexLock(&queuePtr->lock); ! queuePtr->stopped = 1; ! Ns_CondBroadcast(&queuePtr->cond); ! Ns_MutexUnlock(&queuePtr->lock); } static int ! SockSpoolerPush(Driver *drvPtr, Sock *sockPtr) { int trigger = 0; + SpoolerQueue *queuePtr; ! /* ! * Get the next spooler thread from the list, all spooler requests are ! * rotated between all spooler threads ! */ ! ! Ns_MutexLock(&drvPtr->spooler.lock); ! if (drvPtr->spooler.curPtr == NULL) { ! drvPtr->spooler.curPtr = drvPtr->spooler.firstPtr; ! } ! queuePtr = drvPtr->spooler.curPtr; ! drvPtr->spooler.curPtr = drvPtr->spooler.curPtr->nextPtr; ! Ns_MutexUnlock(&drvPtr->spooler.lock); ! ! Ns_MutexLock(&queuePtr->lock); ! if (queuePtr->sockPtr == NULL) { trigger = 1; } ! Push(sockPtr, queuePtr->sockPtr); ! Ns_MutexUnlock(&queuePtr->lock); /* *************** *** 2215,2233 **** if (trigger) { ! SockTrigger(spoolerPipe[1]); } return 1; } ! Sock *SockSpoolerPop(void) { Sock *sockPtr = 0; ! Ns_MutexLock(&spoolerLock); ! sockPtr = spoolerSockPtr; ! if (spoolerSockPtr) { ! spoolerSockPtr = spoolerSockPtr->nextPtr; } ! Ns_MutexUnlock(&spoolerLock); return sockPtr; } --- 2138,2156 ---- if (trigger) { ! SockTrigger(queuePtr->pipe[1]); } return 1; } ! Sock *SockSpoolerPop(SpoolerQueue *queuePtr) { Sock *sockPtr = 0; ! Ns_MutexLock(&queuePtr->lock); ! sockPtr = (Sock*)queuePtr->sockPtr; ! if (queuePtr->sockPtr) { ! queuePtr->sockPtr = ((Sock*)queuePtr->sockPtr)->nextPtr; } ! Ns_MutexUnlock(&queuePtr->lock); return sockPtr; } *************** *** 2253,2257 **** WriterThread(void *arg) { ! WriterQueue *queuePtr = (WriterQueue*)arg; Ns_Time now; char c, *bufPtr; --- 2176,2180 ---- WriterThread(void *arg) { ! SpoolerQueue *queuePtr = (SpoolerQueue*)arg; Ns_Time now; char c, *bufPtr; *************** *** 2418,2426 **** Conn *connPtr = (Conn*)conn; WriterSock *sockPtr; ! WriterQueue *queuePtr; int trigger = 0; ! if (writerThreads == 0 || ! nsend < connPtr->drvPtr->writersize || (conn->flags & NS_CONN_WRITE_CHUNKED)) { return NS_ERROR; --- 2341,2352 ---- Conn *connPtr = (Conn*)conn; WriterSock *sockPtr; ! SpoolerQueue *queuePtr; ! Driver *drvPtr; int trigger = 0; ! drvPtr = connPtr->sockPtr->drvPtr; ! ! if (drvPtr->writer.threads == 0 || ! nsend < drvPtr->writer.maxsize || (conn->flags & NS_CONN_WRITE_CHUNKED)) { return NS_ERROR; *************** *** 2459,2469 **** */ ! Ns_MutexLock(&writerLock); ! if (curQueuePtr == NULL) { ! curQueuePtr = firstQueuePtr; } ! queuePtr = curQueuePtr; ! curQueuePtr = curQueuePtr->nextPtr; ! Ns_MutexUnlock(&writerLock); /* --- 2385,2395 ---- */ ! Ns_MutexLock(&drvPtr->writer.lock); ! if (drvPtr->writer.curPtr == NULL) { ! drvPtr->writer.curPtr = drvPtr->writer.firstPtr; } ! queuePtr = drvPtr->writer.curPtr; ! drvPtr->writer.curPtr = drvPtr->writer.curPtr->nextPtr; ! Ns_MutexUnlock(&drvPtr->writer.lock); /* Index: nsd.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsd.h,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** nsd.h 18 Jan 2006 02:26:53 -0000 1.46 --- nsd.h 18 Jan 2006 17:17:35 -0000 1.47 *************** *** 140,143 **** --- 140,146 ---- typedef int bool; + struct Sock; + struct NsServer; + struct _nsconf { char *argv0; *************** *** 235,238 **** --- 238,273 ---- /* + * The following structure maintains writer socket + */ + + typedef struct WriterSock { + struct WriterSock *nextPtr; + struct Sock *sockPtr; + int fd; + int nread; + int nsend; + int flags; + int bufsize; + char buf[2048]; + } WriterSock; + + /* + * The following structure maintains a queue of sockets for + * each writer or spooler thread + */ + + typedef struct SpoolerQueue { + struct SpoolerQueue *nextPtr; + void *sockPtr; /* List of spooled socket structures. */ + SOCKET pipe[2]; /* Trigger to wakeup WriterThread/SpoolerThread. */ + Ns_Mutex lock; /* Lock around spooled list. */ + Ns_Cond cond; /* Cond for stopped flag. */ + Ns_Thread thread; /* Running WriterThread/Spoolerthread. */ + int stopped; /* Flag to indicate thread stopped. */ + int shutdown; /* Flag to indicate shutdown. */ + int id; + } SpoolerQueue; + + /* * For the time being, don't try to be very clever * and define (platform-neutral) just those two modes *************** *** 320,325 **** */ - struct NsServer; - typedef struct Driver { --- 355,358 ---- *************** *** 361,367 **** int maxheaders; /* Maximum number of request headers. */ int readahead; /* Maximum request size in memory. */ - int uploadsize; /* Minimum upload size for statistics tracking. */ - int writersize; /* Maximum content size when to use writer thread. */ unsigned int loggingFlags; /* Logging control flags */ } Driver; --- 394,415 ---- int maxheaders; /* Maximum number of request headers. */ int readahead; /* Maximum request size in memory. */ unsigned int loggingFlags; /* Logging control flags */ + + struct { + int threads; /* Number of spooler threads to run. */ + int uploadsize; /* Minimum upload size for statistics tracking. */ + Ns_Mutex lock; /* Lock around upload table. */ + Tcl_HashTable table; /* Hash table of uploads. */ + SpoolerQueue *firstPtr; /* Spooler thread queue. */ + SpoolerQueue *curPtr; /* Current spooler thread */ + } spooler; + + struct { + int threads; /* Number of writer threads to run. */ + int maxsize; /* Maximum content size when to use writer thread. */ + Ns_Mutex lock; /* Lock around writer queues. */ + SpoolerQueue *firstPtr; /* List of writer threads. */ + SpoolerQueue *curPtr; /* Current writer thread */ + } writer; } Driver; |
From: Vlad S. <ser...@us...> - 2006-01-18 17:17:43
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22395 Modified Files: ChangeLog Log Message: See ChangeLog Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.277 retrieving revision 1.278 diff -C2 -d -r1.277 -r1.278 *** ChangeLog 18 Jan 2006 02:26:53 -0000 1.277 --- ChangeLog 18 Jan 2006 17:17:35 -0000 1.278 *************** *** 1,2 **** --- 1,15 ---- + 2006-01-18 Vlad Seryakov <ser...@us...> + + * nsd/driver.c: + * nsd/nsd.h: Rewrote driver's spooler/writer support + to make them cleaner and to support multiple spooler/writer + threads for each driver. Before that, global spooler variables + got overwritten if multiple drivers are loaded. Also, + simplified driver thread, removed rotating driver's list, in + case of usual one driver operation that was just waste of CPU + cycles. For multiple drivers, spawning separate thread for each + would be better solution, it can be considered for future driver + encancements. + 2006-01-17 Vlad Seryakov <ser...@us...> |
From: Vlad S. <ser...@us...> - 2006-01-18 04:43:32
|
Update of /cvsroot/naviserver/modules/nsdns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26255/modules/nsdns Modified Files: ChangeLog dns.c dns.h dns_procs.tcl nsdns.c Log Message: Index: dns_procs.tcl =================================================================== RCS file: /cvsroot/naviserver/modules/nsdns/dns_procs.tcl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** dns_procs.tcl 20 May 2005 20:40:08 -0000 1.1.1.1 --- dns_procs.tcl 18 Jan 2006 04:43:21 -0000 1.2 *************** *** 9,13 **** set count 0 while { ![eof $fd] } { ! set line [gets $fd] set ipaddr [lindex $line 0] foreach name [lrange $line 1 end] { --- 9,14 ---- set count 0 while { ![eof $fd] } { ! set line [string trim [gets $fd]] ! if { $line == "" || [string index $line 0] == "#" } { continue } set ipaddr [lindex $line 0] foreach name [lrange $line 1 end] { Index: nsdns.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsdns/nsdns.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** nsdns.c 18 Jan 2006 02:55:41 -0000 1.21 --- nsdns.c 18 Jan 2006 04:43:21 -0000 1.22 *************** *** 121,125 **** char *path, *address; ! Ns_Log(Notice, "nsdns module version %s server: %s", VERSION,server); Ns_RWLockInit(&dnsClientLock); --- 121,125 ---- char *path, *address; ! Ns_Log(Notice, "nsdns module version %s server: %s", DNS_VERSION, server); Ns_RWLockInit(&dnsClientLock); *************** *** 169,173 **** close(dnsUdpSock); close(dnsTcpSock); ! Ns_Log(Error,"nsdns: create proxy thread %s:%d: %s",dnsProxyHost,dnsProxyPort,strerror(errno)); return NS_ERROR; } --- 169,173 ---- close(dnsUdpSock); close(dnsTcpSock); ! Ns_Log(Notice,"nsdns: create proxy thread %s:%d: %s",dnsProxyHost,dnsProxyPort,strerror(errno)); return NS_ERROR; } *************** *** 198,202 **** } 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; --- 198,202 ---- } Ns_MutexSetName2(&dnsProxyMutex,"nsdns","proxy"); ! Ns_Log(Notice,"nsdns: version %s listening on %s:%d, FD %d:%d",DNS_VERSION,address?address:"0.0.0.0",dnsPort,dnsUdpSock,dnsTcpSock); Ns_TclRegisterTrace(server, DnsInterpInit, 0, NS_TCL_TRACE_CREATE); return NS_OK; *************** *** 554,558 **** if ((buf.size = recvfrom(dnsUdpSock,buf.buffer,DNS_BUF_SIZE-1,0,(struct sockaddr*)&buf.addr,&len)) <= 0) { if(dnsDebug > 1) { ! Ns_Log(Error,"nsdns: recvfrom error: %s",strerror(errno)); } continue; --- 554,558 ---- if ((buf.size = recvfrom(dnsUdpSock,buf.buffer,DNS_BUF_SIZE-1,0,(struct sockaddr*)&buf.addr,&len)) <= 0) { if(dnsDebug > 1) { ! Ns_Log(Notice,"nsdns: recvfrom error: %s",strerror(errno)); } continue; *************** *** 561,565 **** gettimeofday(&recv_time,0); if(dnsDebug > 0) { ! Ns_Log(Debug,"nsdns: received %d bytes from %s",buf.size,ns_inet_ntoa(buf.addr.sin_addr)); } /* --- 561,565 ---- gettimeofday(&recv_time,0); if(dnsDebug > 0) { ! Ns_Log(Notice,"nsdns: received %d bytes from %s",buf.size,ns_inet_ntoa(buf.addr.sin_addr)); } /* *************** *** 659,663 **** case NS_SOCK_READ: if((arg.sock = Ns_SockAccept(sock,(struct sockaddr*)&arg.saddr,&saddr_len)) == INVALID_SOCKET) break; ! if(dnsDebug > 3) Ns_Log(Error,"DnsTcpListen: connection from %s",ns_inet_ntoa(arg.saddr.sin_addr)); Ns_ThreadCreate(DnsTcpThread,(void *)&arg,0,0); return NS_TRUE; --- 659,663 ---- case NS_SOCK_READ: if((arg.sock = Ns_SockAccept(sock,(struct sockaddr*)&arg.saddr,&saddr_len)) == INVALID_SOCKET) break; ! if(dnsDebug > 3) Ns_Log(Notice,"DnsTcpListen: connection from %s",ns_inet_ntoa(arg.saddr.sin_addr)); Ns_ThreadCreate(DnsTcpThread,(void *)&arg,0,0); return NS_TRUE; *************** *** 772,776 **** continue; } ! if(dnsDebug > 3) Ns_Log(Error,"DnsProxyThread: received %d bytes from %s",len,ns_inet_ntoa(dnsProxyAddr.sin_addr)); Ns_MutexLock(&dnsProxyMutex); for(req = dnsProxyQueue;req;req = req->next) { --- 772,776 ---- continue; } ! if(dnsDebug > 3) Ns_Log(Notice,"DnsProxyThread: received %d bytes from %s",len,ns_inet_ntoa(dnsProxyAddr.sin_addr)); Ns_MutexLock(&dnsProxyMutex); for(req = dnsProxyQueue;req;req = req->next) { Index: dns.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsdns/dns.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** dns.c 27 Jun 2005 00:01:23 -0000 1.12 --- dns.c 18 Jan 2006 04:43:21 -0000 1.13 *************** *** 123,127 **** if(++server->fail_count > 2 && dnsServers->next) { server->fail_time = now; ! Ns_Log(Error,"dnsLookup: %s: nameserver disabled",server->name); } server = server->next; --- 123,127 ---- if(++server->fail_count > 2 && dnsServers->next) { server->fail_time = now; ! Ns_Log(Notice,"dnsLookup: %s: nameserver disabled",server->name); } server = server->next; *************** *** 131,135 **** if(server->fail_time && now - server->fail_time > dnsFailureTimeout) { server->fail_count = server->fail_time = 0; ! Ns_Log(Error,"dnsLookup: %s: nameserver re-enabled",server->name); } if(!server->fail_time) break; --- 131,135 ---- if(server->fail_time && now - server->fail_time > dnsFailureTimeout) { server->fail_count = server->fail_time = 0; ! Ns_Log(Notice,"dnsLookup: %s: nameserver re-enabled",server->name); } if(!server->fail_time) break; *************** *** 139,143 **** if(!server) break; ! if(dnsDebug > 5) Ns_Log(Error,"dnsLookup: %s: resolving %s...",server->name,name); saddr.sin_addr.s_addr = server->ipaddr; while(retries--) { --- 139,143 ---- if(!server) break; ! if(dnsDebug > 5) Ns_Log(Notice,"dnsLookup: %s: resolving %s...",server->name,name); saddr.sin_addr.s_addr = server->ipaddr; while(retries--) { *************** *** 205,209 **** continue; } ! if(dnsDebug > 3) Ns_Log(Error,"dnsResolve: %s: %d: sending to %s, timeout=%d",name,req->id,server,timeout); tv.tv_usec = 0; tv.tv_sec = timeout; --- 205,209 ---- continue; } ! if(dnsDebug > 3) Ns_Log(Notice,"dnsResolve: %s: %d: sending to %s, timeout=%d",name,req->id,server,timeout); tv.tv_usec = 0; tv.tv_sec = timeout; *************** *** 218,222 **** continue; } ! if(dnsDebug > 3) Ns_Log(Error,"dnsResolve: %s: received %d bytes from %s",name,len,server); if(!(reply = dnsParsePacket(buf,len))) continue; // DNS packet id should be the same --- 218,222 ---- continue; } ! if(dnsDebug > 3) Ns_Log(Notice,"dnsResolve: %s: received %d bytes from %s",name,len,server); if(!(reply = dnsParsePacket(buf,len))) continue; // DNS packet id should be the same *************** *** 226,230 **** return reply; } ! if(dnsDebug > 3) Ns_Log(Error,"dnsResolve: %s: %d: wrong ID %d from to %s",name,req->id,reply->id,server); dnsPacketFree(reply,0); } --- 226,230 ---- return reply; } ! if(dnsDebug > 3) Ns_Log(Notice,"dnsResolve: %s: %d: wrong ID %d from to %s",name,req->id,reply->id,server); dnsPacketFree(reply,0); } *************** *** 293,297 **** Ns_DStringVPrintf(&ds,text, ap); dnsRecordDump(&ds,rec); ! Ns_Log(level < 0 ? Error : Debug,ds.string); Ns_DStringFree(&ds); va_end(ap); --- 293,297 ---- Ns_DStringVPrintf(&ds,text, ap); dnsRecordDump(&ds,rec); ! Ns_Log(level < 0 ? Error : Notice,ds.string); Ns_DStringFree(&ds); va_end(ap); *************** *** 400,403 **** --- 400,404 ---- { dnsRecord *y = ns_calloc(1,sizeof(dnsRecord)); + y->nsize = strlen(name); y->name = ns_malloc(y->nsize+1); *************** *** 1175,1180 **** if(level > dnsDebug) return; - - if(level > dnsDebug) return; va_start(ap, text); --- 1176,1179 ---- *************** *** 1206,1210 **** Ns_DStringPrintf(&ds," ADDITIONAL SECTION: "); for(y = pkt->arlist;y;y = y->next) dnsRecordDump(&ds,y); ! Ns_Log(level < 0 ? Error: Debug,ds.string); Ns_DStringFree(&ds); } --- 1205,1209 ---- Ns_DStringPrintf(&ds," ADDITIONAL SECTION: "); for(y = pkt->arlist;y;y = y->next) dnsRecordDump(&ds,y); ! Ns_Log(level < 0 ? Error: Notice,ds.string); Ns_DStringFree(&ds); } Index: dns.h =================================================================== RCS file: /cvsroot/naviserver/modules/nsdns/dns.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dns.h 24 Jun 2005 00:37:39 -0000 1.9 --- dns.h 18 Jan 2006 04:43:21 -0000 1.10 *************** *** 24,28 **** */ ! #define VERSION "0.7.7" // DNS flags --- 24,28 ---- */ ! #define DNS_VERSION "0.7.7" // DNS flags Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/modules/nsdns/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ChangeLog 1 Aug 2005 18:55:59 -0000 1.7 --- ChangeLog 18 Jan 2006 04:43:21 -0000 1.8 *************** *** 1,2 **** --- 1,6 ---- + 2006-01-17 Vlad Seryakov vl...@cr... + + * fixed segv in caching routine, changes logging level + 2005-08-01 Vlad Seryakov vl...@cr... |
From: Vlad S. <ser...@us...> - 2006-01-18 03:02:36
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26871/nsd Modified Files: driver.c Log Message: Index: driver.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/driver.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** driver.c 18 Jan 2006 02:26:53 -0000 1.34 --- driver.c 18 Jan 2006 03:02:27 -0000 1.35 *************** *** 2421,2426 **** int trigger = 0; - Ns_Log(Notice, "Writer: check %d %d %d %d", writerThreads, nsend,connPtr->drvPtr->writersize,(conn->flags & NS_CONN_WRITE_CHUNKED)); - if (writerThreads == 0 || nsend < connPtr->drvPtr->writersize || --- 2421,2424 ---- |