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

Re: PATCH: back-sock

On Thu, Oct 13, 2005 at 03:24:58PM +0200, Hallvard B Furuseth wrote:
> Brian, you have a name conflict with at least print_suffixes() and
> read_and_send_results() in back-shell.  You can prefix the names with
> sock_, or maybe reuse some back-shell code similar to how back-hdb
> reuses back-bdb code.

Strangely, I didn't get a linker error when building with both
--enable-shell and --enable-sock. But I've fixed it now by adding the sock_
prefix as you suggested.

[I suspect you'd never actually use both at once: --enable-shell requires
threading to be turned off, and --enable-sock only really comes into its own
with threading enabled]

Anyway, a patch against 2.3.11 is attached. If you do

    cd servers/slapd
    diff -uNr back-shell/ back-sock/

you'll see that there's not much difference between them.

I was a bit more concerned about the assertion error I saw when running
back-sock on 2.2.26; although I did only see it once, it suggests there may
be some thread-safety issue which I've overlooked.



P.S. Aside: it struck me after originally writing this code that if you're
going to use openldap in this way, all that it is doing is acting as an ASN1
to back-shell protocol converter. In that case, your backend script might as
well just talk ASN1 instead of back-shell. I even went as far as
implementing this - but in Ruby, as it would be far too painful in Perl.

Attachment: openldap-backsock-2.3.11.diff.gz
Description: Binary data