At 08:28 PM 7/18/01 -0400, you wrote:
>On 2001.07.18, Jerry Asher <[EMAIL PROTECTED]> wrote:
> > When I restarted the server none of this worked, and my 3am debugging seems
> > to reveal that the value of [ns_info server] is "" at the time the config
> > file is evaluated.
>
>Does this happen in 3.4?
I haven't tried this in 3.4, but my code exam suggests it should have the
same problem. The problem occurs within nsd/nsmain.c in the following
fragment.... (sourceforge claims this is nsmain.c 1.22.2.3 tag nsd_v3_r4)
You can see how right off the bat it evals the config file, and THEN it
sets the nsserver nsconf.server value.
My suggested fix for 3.3 was to set the server variable first.
Jerry
/*
* Initialize Tcl and eval the config file.
*/
nsconf.nsd = NsTclFindExecutable(argv[0]);
if (nsconf.configfmt == 't') {
NsConfigEval(config);
}
ns_free(config);
/*
* Determine the server to run.
*/
if (server != NULL) {
if (Ns_ConfigGet(NS_CONFIG_SERVERS, server) == NULL) {
Ns_Fatal("nsmain: no such server '%s'", server);
}
} else {
. . .
}
nsconf.server = nsServer = server;
=====================================================
Jerry Asher [EMAIL PROTECTED]
1678 Shattuck Avenue Suite 161 Tel: (510) 549-2980
Berkeley, CA 94709 Fax: (877) 311-8688