|
From: Rainer G. <rge...@hq...> - 2008-02-16 17:10:52
|
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.
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... ;)
Rainer
On Sat, 2008-02-16 at 17:07 +0100, Markus Hoenicka wrote:
> Rainer Gerhards writes:
> > Please review the patch, comments are of course welcome.
> >
>
> Thanks for the patch, which looks pretty clean and useful. However, a
> quick test on FreeBSD using libdbi-drivers "make check" (which
> still uses the *old* interface) causes a coredump:
>
> 5 drivers available: /usr/local/bin/bash: line 4: 5147 Segmentation fault: 11 (core dumped) ${dir}$tst
>
> and gdb says:
>
> (gdb) bt
> #0 0x28080561 in dbi_driver_get_name () from /usr/local/lib/libdbi.so.0
> #1 0x0804a8df in ask_for_conninfo (ptr_cinfo=0xbfbfe240) at test_dbi.c:525
> #2 0x08049883 in main (argc=1, argv=0xbfbfe758) at test_dbi.c:69
>
> I'll further investigate, but if you see an obvious error in the code
> based on this observation, let me know.
>
> regards,
> Markus
>
|