On Sun, 2008-05-11 at 00:02 +0200, Petter Reinholdtsen wrote: > > - I would really like to have the retry mechanism in myldap.c and > > not outside because most of the retry code is already there and > > this solution will probably conflict with that. > > I tried this, but the current API did not seem to have the required > information available when a search failed, so I decided to move out a > few layers until the required information was available. Also, I do > not really have enough knowledge about the inner workings of nss-ldapd > to rewrite it to do this.
I have implemented the retry mechanism from within myldap_get_entry(). I have added a field to the myldap_search struct to indicate that the search may be retried (e.g. no entry has yet been returned and no retries have been done yet). For this to work some code has been reshuffled to make this possible. This has been implemented in r733. Could you give it a try? I'm not yet 100% satisfied with the code because restarting the search from a running search is a bit ugly. Maybe I should restructure the code to only start the actual search and open the connection in myldap_get_entry() instead of in myldap_search(), but that will be for another time. Anyway, thanks for your patch, it really helped get my head around the solution. Most of the difficulty is in finding the proper solution and writing down my thoughts helped a lot. -- -- arthur - [EMAIL PROTECTED] - http://people.debian.org/~adejong --
signature.asc
Description: This is a digitally signed message part