From: Stephen D. <sd...@gm...> - 2005-10-21 06:33:37
|
On 10/20/05, Zoran Vasiljevic <zv...@ar...> wrote: > > Am 21.10.2005 um 07:40 schrieb Stephen Deasey: > > > > > Here's the error shown at startup: > > > > Notice: modload: loading > > /home/sd/naviserver-nsdbtest/tests/../nsdbtest/nsdbtest.so > > Error: modload: invalid server name: 'nsdbtest' > > Error: dbdrv: failed to load driver 'nsdbtest' > > Error: dbinit: no such default pool 'a' > > > > Right. The "server" argument is kind-of misued in > call to Ns_ModuleLoad from nsdb.c. > > The easiest fix to that is to use Ns_TclAllocateInterp(NULL) > in Ns_ModuleLoad. We do not need the interp there really for > any other purpose but getting the error message if the module > does not load. I believe this is most non-intrusive and simple > fix for that. Hmm, now that I look at the code path for Ns_TclAllocateInterp with a NULL server argument, it doesn't seem to be handled correctly. But, does this really make sense? The idea behind AllocateInterp is that it caches them per thread, one for each virtual server. But what interp state do you need to cache for a non-virtual server interp?=20 And which threads are creating them? I think Ns_TclAllocateInterp should disallow a NULL server arg. What do you think. I seem to remember that it was me that changed your original code to use the AllocateInterp call. Oops... :-) I'll change it back. |