[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: notification of connection closure to database backends.



Howard Chu wrote:

> This sounds good to me. The same thing is needed in the LDAP backend. I
> never pursued it there, but it is certainly a loose end.
>

Ah, nice to hear I'm not the only one who needs this functionality.
Since it's such a small patch and it does not affect anything if you don't
register the notification functions, I took the liberty to directly commit it
to -devel. I hope I haven't been impolite :-)

How to use the patch:

In the initialization routine of your backend fill in
backend_info.bi_connection_init or backend_info.bi_connection_destroy, e.g.:

        bi->bi_connection_init = ldap_back_on_connection_init;
        bi->bi_connection_destroy = ldap_back_on_connection_destroy;

Implement
int ldap_back_on_connection_init(Backend *be, Connection *conn);
int ldap_back_on_connection_destroy(Backend *be, Connection *conn);


That's all.

Good luck,

Bastiaan

begin:          vcard
fn:             Bastiaan Bakker
n:              Bakker;Bastiaan
org:            LifeLine Networks BV
email;internet: Bastiaan.Bakker@lifeline.nl
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard