Vlad Seryakov wrote:
Hmm, not sure. The nsdb module is also a global module. But it's
kinda weird...
I checked, nsdb cannot be loaded globally, expects not-NULL server, so
we have only nssock that can be loaded globally and actually for nssock
itself it does not matter because driver/c uses SetServer anyway to find
appropriate server.
So i think we may decide to get rid of global modules all together.
The only change will be in driver.c:
instead of:
if (sockPtr->servPtr == NULL) {
it will be:
if (hosts.numEntires > 0) {
the rest is the same:
if (host) {
hPtr = Tcl_FindHashEntry(&hosts, host);
if (hPtr != NULL) {
mapPtr = Tcl_GetHashValue(hPtr);
}
}
if (!mapPtr) {
mapPtr = defMapPtr;
}
if (mapPtr) {
sockPtr->servPtr = mapPtr->servPtr;
sockPtr->location = mapPtr->location;
}
if (sockPtr->servPtr == NULL) {
status = 0;
}
}
And those lines from Ns_DriverInit should be removed:
if (server == NULL) {
if (defserver == NULL) {
Ns_Fatal("%s: virtual servers configured,"
" but %s has no defaultserver defined", module, path);
}
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/