Dear Friends of NaviServer,

the last release of NaviServer was more than half a year or more than
730 commits ago, so it becomes time for a release of 4.99.7 if this
is fine with everybody.

Below is the preliminary summary of the changes since the release
of 4.99.6 (excluding the changes in the modules). If you have
pending commits please let me know.

i'll hope to be able to do the usual testing, updates of the
versions numbers in the documentation, tagging, summarizing
of the module changes etc. over the weekend.

all the best
-gustaf neumann

PS: sooner or later a release 5.0 seems unavoidable, but are coming closer.




======================================
NaviServer 4.99.7, released 2015-XX-XX
======================================

Changes relative to 4.99.6
     215 files changed, 20782 insertions(+), 13282 deletions(-)

New Features:

   * Added Interface to NaviServer to read/write directly
     via driver routines. The new command "ns_connchan"
     provides a higher level alternative to the idiom
     "ns_conn channel" + Tcl-commands. The new command
     uses the internal socketcallback infrastructure and allows to
     
       - detach the currently open connection channel from a
         connection thread, to
       - read/write/close the channel from other threads, and to
       - query the states to then currently detached channels
         (similar to "ns_writer list")
       
     By accessing the driver infrastructure, "ns_connchan" makes it
     possible to read/write from/to SSL/TLS channels. The new command
     makes it easy e.g.  to implement WebSockets over SSL/TLS
     (ws://... and wss://...) which is not possible with the
     pre-existing infrastructure.

     Summary of Advantages:
       * use the same interface for http and https (and other drivers)
       * no (potential) problems with select() in Tcl when using
         many (>1024) file descriptors
       * less potential problems with Tcl-Sockets (buffering, translations)
       * lower resource consumption

     Implemented interface:
        ns_connchan detach
        ns_connchan close channel
        ns_connchan list ?-server server?
        ns_connchan callback ?-timeout s? ?-receivetimeout s? ?-sendtimeout s? 
channel command when
        ns_connchan read channel
        ns_connchan write channel string

   * Improved ns_log handling
     - new subcommand [ns_log stats] returns the statistics
       from calls to ns_log by severity-level. This allows
       to write monitoring tools to provide rough overviews
       at which time at which server what kind of
       servers/warnings/... were produced
       
     - Allow to modify logging of sql statements via
          ns_logctl severity Debug(sql) on
       at runtime
       
     - Add debugging severity for tasks "Debug(task)"

   * Added ability to load a driver module without listening on a
     port: This is useful in cases, where the driver registers
     client commands (such as nssock or nsssl) and only these
     are wanted. Loading the driver without listening can be
     achieved by specifying "0" for the port.

   * Improved support for windows compilation with native compilers
     for 32 and 64 bit (Many thanks to Andreas Piskorski)


Performance Improvements:
   - add compiler hints likely/unlikely
   - make Ns_Encrypt threadsafe under Linux (reduce mutex)
   - use getpwnam_r, getpwuid_r, getgrnam_r, and getgrgid_r instead of
     their thread-unsafe counterparts. This change allow these functions
     to run without locking.
   - reduce size of compressed requests in several situations (empty io_vecs)


Bug Fixes:
   * fixed encoding in [ns_conn content]
   * fixed incorrect result of "ns_conn protocol" (returned empty)
   * fixed crash when a thread was created with
     "ns_thread begindetached" and an error occurred
     during startup
   * fixed memory management for TclThread by moving TclThreadArg into
     thread local storage
   * fixed race condition in TLS cleanup
   * fixed bug in argument parsing of "ns_cond"
   * fixed setting of private/shared in ns_module
   * fixed bug with "ns_adp_ctl stream on"
   * move network module filtering to the front to avoid double loading
     of tcl modules (many thanks to William Scott Jordan for the fix)
   * ns_http:
     - fix trailing slashes in some urls
     - fix possible race condition when time gap between "ns_http queue"
       and "ns_http wait" is larger
   * minor fixes in nscgi
   * windows
     - fixed Ns_NormalizePath() for //foo/bar paths on Win32 (bug #1162890)
     - use distinct bit-patterns for signal detection under windows.
      - fix array unset bug
   * fixed a potential race condition in writer threads
   * [ns_perm delperm] fixed ignoring of argument "-noinherit"
   * fixed reply headers in HEAD requests


Documentation improvements:
   - improve typesetting, wording
   - remove more obsolete content (e.g. concerning CVS, old dummy parameters)
   - use examples from existing code basis
   - improve comment density in source code
   - document missing subcommands, such as "ns_time format"


Tcl API Changes:
   * mark "ns_geturl" as deprecated, use ns_http instead
   * marked redundant names of subcommands in "ns_thread" as deprecated
     - ns_thread begin -> ns_thread create
     - ns_thread getid -> ns_thread id
     - ns_thread join -> ns_thread wait
     - ns_thread get -> ns_thread handle
   * allow time interval of "-timeout" for "ns_db gethandle" to be
     specified with second factions (in the usual "ns_time" format)


C API Changes:
   - [ns_conn content]: new flag "-binary" to return always the raw bytes
   - [ns_thread begin|begindetached]: added flag "-name" for naming
     thread explicit


Configuration Changes:
   - update Makefiles as recommended in documentation


Code Changes:

   * Many of the changes are the result of a (sometimes over-picky)
     code-checkers on unix and windows systems, in particular pc-lint,
     cppcheck and the clang static checkers. Many thanks to
     Maurizio Martignano for setting up the testing framework
     based on SonarQube.
   
   * Function prototypes and API definition
     - add missing function prototypes
     - removed occurrences of old-style prototypes (when functions are defined 
without arguments)
     - removed unneeded external references and symbols and unreferenced 
enumeration values
     - aligned argument names in function prototypes with function definitions
     - added non-null/returns non-null assertions for prototypes
     - added asserts to check non-null properties
     - added "const" when appropriate
     - added missing "static" declarations

   * Improved and more consistent macro definitions
     - use INT2PTR and PTR2INT consistently when converting between
       integers and pointers
     - use NS_TRUE/NS_FALSE instead of 1/0
     - use NS_INVALID_FD instead of -1
     - use NS_SOCKET and NS_INVALID_SOCKET instead of int/-1
     - use NS_INVALID_PID for invalid pids
     - change from usage of -1 or INVALID_SOCKET (windows predefined constant)
       to NS_INVALID_SOCKET due to confusions
     - use UNUSED consistently
     - character properties and conversions
        . new macro CHARTYPE for testing character properties
        . new macro CHARCONV for converting characters
     - added a new macros PTR2NSSOCK and NSSOCK2PTR in analogy to PTR2INT
       and INT2PTR to mask more win incompatibilities
     - prefer "const" over "CONST" unless in Tcl interface
     - improved consistency of variable and macro naming
     - put macro values into parenthesis

   * Improved general code quality
     - reduced variable scopes
     - remove cases of undefined C behavior
     - prefer leaving a switch statement via "break", and not via "return"
     - move assignments out of if-conditions
     - brace body of "if" statements and "for" loops
     - make ignoring of function results explicit
     - avoid shadowing of variable names
     - fix potentially uninitialized local and static variables

   * Used more precise and consistent types
     - prefer type "bool" over "int" when appropriate
     - use unsigned types for bit operations
     - prefer size_t, ssize_t, socklen_t, pid_t, nfds_t over int
     - use consistently uintptr_t for nextids
     - use enumerations instead of plain defines on some occasions
     - prefer boolean expression
     - reduce implicit conversions
       (signed/unsigned, signed constants, loss of precision, ...)
     - removed many cases of casts of complex expressions
     - reduce prohibited operations with plain (signed) chars
     - recast results of <<
     - standardize type definitions of objv in ObjCmds to the
       variant recommended by Tcl man pages

   * Improved C-standard compliance
     - silence "-pedantic" compilation with -stc=c99 under linux on most cases
     - avoid c90 identifiers starting with str[a-z], to[a-z], E[A-Z], _*
     - avoid c90 reserved identifier "signal", "free", "remove", "time"
     - added missing printf macros

   * Improved usage of c-library functions and OS abstraction
      - use arc4random() when available
      - use crypt_r() when available
      - prefer memcpy() over strncpy(), since it has in most cases the
        appropriate semantics and it is faster
     - new/fixed OS abstractions functions/macros:
        ns_lseek, ns_dup, ns_dup2, use ns_open, ns_close, ns_lseek, ns_dup,
        ns_dup2, ns_write, ns_read, ns_mkstemp

   * Removed potential crashes from buffer overflows
      - use memory bounded functions instead of potentially buffer
        overflowing functions
      - replace unsafe atof() by strtod()
      - replace unsafe atoi() by strtol()
      - replace call to deprecated function asctime() by a call to
        asctime_s()
      - remove hard-coded sizes of ip-addresses and replace it
        by NS_IPADDR_SIZE
      - don't hardcode sizes for string arrays

   * Use of modern-style argument parser Ns_ParseObjv() on several places
     instead of manual argv parsing
        ns_job interface, ns_truncate, ns_ftruncate,
        ns_addrbyhost, ns_hostbyaddr
        
   * Make mutex timings configurable via #define NS_NO_MUTEX_TIMING

   * Improved code formatting
     - add emacs editor hints to to keep formatting conventions
     - prefer spaces over tabs
     
   * Extended regression test

     


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to