Update of /cvsroot/naviserver/naviserver/nsd
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13973/nsd
Modified Files:
modload.c
Log Message:
* nsd/modload.c (Ns_ModuleLoad): Although the first two arguments
to Ns_ModuleLoad are called server and module, they're really just
two arbitrary strings passed to the module. The nsdb module for
examples passes the driver name and configuration path. For this
reason we cannot realy on knowing the current virtual server and
so cannot allocate an interp from the per-thread cache.
Index: modload.c
===================================================================
RCS file: /cvsroot/naviserver/naviserver/nsd/modload.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** modload.c 9 Oct 2005 22:27:24 -0000 1.7
--- modload.c 21 Oct 2005 06:50:11 -0000 1.8
***************
*** 159,167 ****
}
! interp = Ns_TclAllocateInterp(server);
! if (interp == NULL) {
! Ns_Log(Error, "modload: invalid server name: '%s'", server);
! return NS_ERROR;
! }
status = Tcl_FSLoadFile(interp, pathObj, init, "Ns_ModuleVersion",
&tclInitProc, &tclVerProc, &lh, &uPtr);
--- 159,163 ----
}
! interp = Tcl_CreateInterp();
status = Tcl_FSLoadFile(interp, pathObj, init, "Ns_ModuleVersion",
&tclInitProc, &tclVerProc, &lh, &uPtr);
***************
*** 169,176 ****
if (status != TCL_OK) {
Ns_Log(Error, "modload: %s: %s", file, Tcl_GetStringResult(interp));
! Ns_TclDeAllocateInterp(interp);
return NS_ERROR;
}
! Ns_TclDeAllocateInterp(interp);
initProc = (Ns_ModuleInitProc *) tclInitProc;
--- 165,172 ----
if (status != TCL_OK) {
Ns_Log(Error, "modload: %s: %s", file, Tcl_GetStringResult(interp));
! Tcl_DeleteInterp(interp);
return NS_ERROR;
}
! Tcl_DeleteInterp(interp);
initProc = (Ns_ModuleInitProc *) tclInitProc;
|