|
From: Markus H. <mar...@mh...> - 2008-02-16 23:38:46
|
Rainer Gerhards writes: > The problem was that I originally had the caller define the instance > structure (well, kind of... ;)). I discovered this didn't work (I was > too much rsyslog-minded, especially in my assumptions), changed things > and forgot to re-test with the old interface. New patch attached, > replaces the old one. I have done some limited testing with rsyslog > itself. > This one works for me, using the old interface. I'll attempt to modify libdbi-driver's test program to allow testing both interfaces. I'll be back with the results of the new interface as soon as time permits. > As a side-note, one must be careful when converting to the new > interface. If just the dbi_initialize_r() is used but the others use the > old functions, there is a lot of trouble. I ran myself into it. > Unfortunately, I have no smart idea how to circumvent it. The deprecated > macros will probably help... ;) > A half-assed way to circumvent this problem is to have dbi_initialize_r set dbi_inst_legacy in addition to the structure pointed to by **Inst. This will allow to run the old functions safely and correctly as long as the initialization function is called only once. However, this way we'll probably help to cover up many incomplete migration attempts, so it may be more prudent to have the apps crash right away so they get fixed. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |