rem: nsconf.serv.connsperthread = GetInt(path, "connsperthread", 0); nsconf.serv.minthreads = GetInt(path, "minthreads", 0); nsconf.serv.maxthreads = GetInt(path, "maxthreads", 20); nsconf.serv.threadtimeout = GetInt(path, "threadtimeout", 120); nsconf.conn.maxheaders = GetInt(path, "maxheaders", 16384); nsconf.conn.maxline = GetInt(path, "maxline", 8192); nsconf.conn.maxpost = GetInt(path, "maxpost", 65536); nsconf.conn.flushcontent = GetBool(path, "flushcontent", 0); nsconf.conn.modsince = GetBool(path, "checkmodifiedsince", 1);
add: nsconf.serv.connsperthread = GetInt(path, "connsperthread", SERV_CONNSPERTHREAD_INT); nsconf.serv.minthreads = GetInt(path, "minthreads", SERV_MINTHREADS_INT); nsconf.serv.maxthreads = GetInt(path, "maxthreads", SERV_MAXTHREADS_INT); nsconf.serv.threadtimeout = GetInt(path, "threadtimeout", SERV_THREADTIMEOUT_INT); nsconf.conn.maxheaders = GetInt(path, "maxheaders", CONN_MAXHEADERS_INT); nsconf.conn.maxline = GetInt(path, "maxline", CONN_MAXLINE_INT); nsconf.conn.maxpost = GetInt(path, "maxpost", CONN_MAXPOST_INT); nsconf.conn.flushcontent = GetBool(path, "flushcontent", CONN_FLUSHCONTENT_BOOL); nsconf.conn.modsince = GetBool(path, "checkmodifiedsince", CONN_MODSINCE_BOOL);
context: NsConfInit(void){    char *s, *p, *path, *olddf, *oldp;    int i;    Ns_DString ds, pds;    char *ignored[] = {"creatmode", "mkdirmode", "faststart", "quotesize",		       "quotewarningperiod", "checkstats",		       "checkstatsinterval", "logqueryontclerror",		       "connectionyield", NULL};        Ns_DStringInit(&ds);    Ns_DStringInit(&pds);    /*     * log.c     */         nsconf.log.expanded = GetBool(PARAMS, "logexpanded", 0);    nsconf.log.dev = GetBool(PARAMS, "dev", 0);    nsconf.log.debug = GetBool(PARAMS, "debug", 0);    nsconf.log.maxback = GetInt(PARAMS, "maxbackup", 10);    /*     * libnsthread.a     */    i = GetInt(PARAMS, "stacksize", nsThreadStackSize);    nsThreadStackSize = GetInt("ns/threads", "stacksize", i);    nsThreadMutexMeter = GetBool("ns/threads", "mutexmeter", 0);        /*     * nsmain.c     */             nsconf.shutdowntimeout = GetInt(PARAMS, "shutdowntimeout", 20);    nsconf.bufsize = GetInt(PARAMS, "iobufsize", 16000);    /*     * sched.c     */    nsconf.sched.maxelapsed = GetInt(PARAMS, "schedmaxelapsed", 2);    /*     * binder.c, win32.c     */    nsconf.backlog = GetInt(PARAMS, "listenbacklog", 32);        /*     * dns.c     */         nsconf.dns.cache = GetBool(PARAMS, "dnscache", 1);    nsconf.dns.timeout = GetInt(PARAMS, "dnscachetimeout", 60) * 60;    nsconf.dstring.maxentries = GetInt(PARAMS, "dstringcachemaxentries", 10);    nsconf.dstring.maxsize = GetInt(PARAMS, "dstringcachemaxsize", 3*1024);    /*     * exec.c     */         nsconf.exec.checkexit = GetBool(PARAMS, "checkexitcode", 1);    /*     * keepalive.c     */         nsconf.keepalive.timeout = GetInt(PARAMS, "keepalivetimeout", 30);    if (nsconf.keepalive.timeout > 0) {	nsconf.keepalive.enabled = 1;    }    nsconf.keepalive.maxkeep = GetInt(PARAMS, "maxkeepalive", 100);    /*     * return.c, serv.c, conn.c     */    /*     * Configuration values come from the server-specific     * config section (e.g., ns/server/server1) even though     * only a single server runs in AOLserver 3.0+.  This is     * for backwards compatibility with pre-3.0 config file     * versions and so a single config file can be used     * with multiple server processes.     */    Ns_DStringTrunc(&pds, 0);    path = Ns_DStringVarAppend(&pds, "ns/server/", nsServer, NULL);    nsconf.serv.realm = GetString(path, "realm", nsServer);    nsconf.serv.aolpress = GetBool(path, "enableaolpress", 0);    nsconf.serv.sendfdmin = GetInt(path, "sendfdthreshold", 2048);    nsconf.serv.maxconns = GetInt(path, "maxconnections", 100);    nsconf.serv.maxdropped = GetInt(path, "maxdropped", 0);    /* NB: DirectoryFile, DirectoryListing, and Pages in old location. */    olddf = GetString(path, "directoryfile", NULL);    oldp = GetString(path, "pageroot", NULL);    s = GetString(path, "directorylisting", "none");    if (STREQ(s, "simple") || STREQ(s, "fancy")) {	s = "_ns_dirlist";    } else {	s = NULL;    }    nsconf.fastpath.dirproc = GetString(path, "directoryproc", s);    nsconf.fastpath.diradp = GetString(path, "directoryadp", NULL);    if (GetBool(path, "globalstats", 0)) {	nsconf.serv.stats |= STATS_GLOBAL;    }    nsconf.serv.maxurlstats = GetInt(path, "maxurlstats", 1000);    if (nsconf.serv.maxurlstats > 0 && GetBool(path, "urlstats", 0)) {	nsconf.serv.stats |= STATS_PERURL;    }    nsconf.serv.errorminsize = GetInt(path,  "errorminsize", 514);    nsconf.serv.noticedetail = GetBool(path, "noticedetail", 1);    /*     * ConnsPerThread specifies the maximum number of connections for     * a thread to handle before exiting perhaps to benefit from some     * TLS garbage collection.  A value <= 0 disables this feature.     */    nsconf.serv.connsperthread = GetInt(path, "connsperthread", 0);    nsconf.serv.minthreads = GetInt(path, "minthreads", 0);    nsconf.serv.maxthreads = GetInt(path, "maxthreads", 20);    nsconf.serv.threadtimeout = GetInt(path, "threadtimeout", 120);    nsconf.conn.maxheaders = GetInt(path, "maxheaders", 16384);    nsconf.conn.maxline = GetInt(path, "maxline", 8192);    nsconf.conn.maxpost = GetInt(path, "maxpost", 65536);    nsconf.conn.flushcontent = GetBool(path, "flushcontent", 0);    nsconf.conn.modsince = GetBool(path, "checkmodifiedsince", 1);    s = GetString(path, "headercase", "preserve");    if (STRIEQ(s, "tolower")) {    	nsconf.conn.hdrcase = ToLower;    } else if (STRIEQ(s, "toupper")) {	nsconf.conn.hdrcase = ToUpper;    } else {    	if (!STRIEQ(s, "preserve")) {	    Ns_Log(Error, "conf: "		   "[%s]headercase = %s invalid - set to preserve", path, s);    	}    	nsconf.conn.hdrcase = Preserve;    }    /*     * fastpath.c     */    Ns_DStringTrunc(&pds, 0);    path = Ns_DStringVarAppend(&pds, "ns/server/", nsServer, "/fastpath", NULL);    nsconf.fastpath.mmap = GetBool(path, "mmap", 0);    nsconf.fastpath.cache = GetBool(path, "cache", 1);    if (nsconf.fastpath.cache) {    	nsconf.fastpath.cachesize = GetInt(path, "cachemaxsize", 5000*1024);	nsconf.fastpath.cachemaxentry = GetInt(path, "cachemaxentry", 8192);    }    s = GetString(path, "directoryfile", olddf);    if (s != NULL) {    	s = ns_strdup(s);    	nsconf.fastpath.dirc = 1;	p = s;    	while ((p = (strchr(p, ','))) != NULL) {	    ++nsconf.fastpath.dirc;	    ++p;	}	nsconf.fastpath.dirv = ns_malloc(sizeof(char *) * nsconf.fastpath.dirc);	for (i = 0; i < nsconf.fastpath.dirc; ++i) {    	    p = strchr(s, ',');	    if (p != NULL) {	    	*p++ = '\0';	    }	    nsconf.fastpath.dirv[i] = s;	    s = p;	}    }    if (oldp != NULL) {    	nsconf.fastpath.pageroot = GetString(path, "pageroot", oldp);    } else {    	Ns_DStringTrunc(&ds, 0);    	Ns_ModulePath(&ds, nsServer, NULL, "pages", NULL);	nsconf.fastpath.pageroot = GetString2(path, "pageroot", &ds);    }    /*     * tclinit.c     */         Ns_DStringTrunc(&pds, 0);    path = Ns_DStringVarAppend(&pds, "ns/server/", nsServer, "/tcl", NULL);    nsconf.tcl.autoclose = GetBool(path, "autoclose", 1);    nsconf.tcl.debug = GetBool(path, "debug", 0);        Ns_DStringTrunc(&ds, 0);    Ns_ModulePath(&ds, nsServer, "tcl", NULL);    nsconf.tcl.library = GetString2(path, "library", &ds);    Ns_DStringTrunc(&ds, 0);    Ns_HomePath(&ds, "modules", "tcl", NULL);    nsconf.tcl.sharedlibrary = GetString2(path, "sharedlibrary", &ds);    nsconf.tcl.statlevel = GetInt(path, "statlevel", 0);    nsconf.tcl.statmaxbuf = GetInt(path, "statmaxbuf", 1000);    nsconf.tcl.nsvbuckets = GetInt(path, "nsvbuckets", 8);    /*     * adp.c, adpfancy.c     */    Ns_DStringTrunc(&pds, 0);    path = Ns_DStringVarAppend(&pds, "ns/server/", nsServer, "/adp", NULL);    nsconf.adp.errorpage = GetFile(path, "errorpage");    nsconf.adp.startpage = GetFile(path, "startpage");    nsconf.adp.enableexpire = GetBool(path, "enableexpire", 0);    nsconf.adp.enabledebug = GetBool(path, "enabledebug", 0);    nsconf.adp.debuginit = GetString(path, "debuginit", "ns_adp_debuginit");    nsconf.adp.defaultparser = GetString(path, "defaultparser", "adp");    nsconf.adp.taglocks = GetBool(path, "taglocks", 0);    /*     * ADP supports three caching options:     *     * 1.  Disabled:  No caching, files read and parsed on each connection.     *     This uses no cache memory but would likley result in higher load.     *     * 2.  Shared:  Single, interlocked cache for all threads.  For Tcl 8.2,     *     this disables the byte-code caching code in tclNsd.c.  This is     *     option uses less memory but, although unlikely, could result     *     in lock contention.  This is the default for 7.6.     *     * 3.  Private:  Each thread reads, parses, and caches files, enabling     *     bytes codes for Tcl 8.2.  This option uses more memory and could,     *     although unlikley, result in lower cache hit rates and higher     *     load.  This is the default for 8.2.     */    nsconf.adp.cache = GetBool(path, "cache", 1);    if (nsconf.adp.cache) {	i = (*nsTclVersion == '7' ? 0 : 1);	nsconf.adp.threadcache = GetBool(path, "threadcache", i);	nsconf.adp.cachesize = GetInt(path, "cachesize", 5000*1024);    }        for (i = 0; ignored[i] != NULL; ++i) {	if (Ns_ConfigGet(PARAMS, ignored[i]) != NULL) {	    Ns_Log(Warning, "conf: ignored 2.x option: %s", ignored[i]);	}    }    Ns_DStringFree(&ds);}