On 2020-02-24 13:25, Dimitry Sibiryakov wrote:
24.02.2020 08:52, Alex Peshkoff via Firebird-devel wrote:
That makes it possible to register builtin (or virtual like you
called them) plugins with special "builtin" module which is never
unloaded.
Yes, but only until any real plugin is loaded:
if (module->findSymbol(stArray,
STRINGIZE(FB_PLUGIN_ENTRY_POINT), startModule))
{
current = rc;
startModule(masterInterface);
current = NULL;
return rc;
}
Shouldn't "current" here to be returned to previous value instead?
It's supposed that all builtin plugins are loaded in the most beginning
of application use, at least before any activity causing regular load of
plugins takes place. Therefore I prefer to set current to NULL in order
to detect suspicious registration of plugins. For both client library
and network server (they contain builtin plugins) this works fine. If
there will be serious need to load builtin plugins in the middle of
processing... Well, certainly that can be changed, but I wish to know
the reasons for such solution. Currently I do not see them - builtin
plugins are statically linked with executable module and therefore are
well known, what's bad with registering them all in initialization code?
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel