Markus,
I had a somewhat deeper look at dbi_main now. I think four or five
functions would need to be changed in the way you propose. However, as
this is an interface change, the previous functions would need to remain
as is (including the plugin problem). While I looked at the code, I
think a few mutex lock/unlock calls would also make it thread-safe. That
is not a big issue for me, as rsyslog allows plugins to run on a single
thread, but it may be a benefit for other situations.
If you like, I can try to apply a number of changes and provide a patch
file for your review.
Rainer
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Markus Hoenicka
Sent: Friday, February 15, 2008 7:00 PM
To: libdbi-users@lists.sourceforge.net
Subject: Re: [libdbi-users] Feedback and Questions [resend]
Rainer Gerhards writes:
In any case, I suggest that a second call of
dbi_initialize() inside the
same instance should return an error state - sounds better than
unpredictable behavior. Making it multi-init safe could
IMHO easily be
done by using one additional handle.
I can't claim to be an expert at these issues, but I imagine that
moving the sentinel of the driver list into the application linked
against libdbi instead of implementing it as a static global variable
might resolve this problem. dbi_initialize would then look somewhat
like:
dbi_driver_t* dbi_initialize(const char *driverdir, int* numdrivers);
(dbi_driver_t may not be user-visible at this time, but you get the
idea).
I'll be happy to consider this change if it helps to make libdbi
plugin-safe.
regards,
Markus
--
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with mhoenicka)
http://www.mhoenicka.de
--
---
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users