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

Re: PATCH: back-sock

Brian Candler writes:
>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.

I have to admit I didn't try to compile, I just looked at the code.
However, backends are linked in as archives or dynamic libraries.
With the former, the linker - or ar? Don't remember - will happily
pick the first occurrence of the symbol after it is referenced, and
ignore the next.  With the latter, I think most OSes will allow both
to be used at once - and each library will use its own version.

> [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]

In OpenLDAP 2.3, './configure --enable-backends' enables all backends
except the ones you explicitly disable.

> 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.

Well, personally I haven't looked closely at the code yet, and won't for
a while.

I wonder if one could write a worker which turns the requests right back
to LDAP requests and feeds them back to slapd - and then run a big part
of the current test suite against back-sock:-)  Might be easier if
back-sock has an option to talk ASN.1 instead of a text protocol with
the worker.