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

Re: ITS#3985 test039 hangs on Windows



Kurt D. Zeilenga wrote:
And in ldap_parse_result in libldap/error.c, as I've already pointed out, we queue responses with their originating requests. Any LDAP Request can only have one Result message, regardless of how many intermediate messages may be included. So it appears that all accomodation for this LDAP_MORE_RESULTS_TO_RETURN error code is just excess baggage.

The only thing I can think it exists for handling of message chains containing responses in reply to multiple requests.

Hmmm. But libldap never constructs chains in such a fashion; responses are only chained to their originating request. And there are no APIs for an external caller to link two separate chains together.

Also, in the C API draft section 14 "Handling Errors and Parsing Results" it says "If a chain of messages that contains more than one result message is passed to these routines the always operate on the first result in the chain." And more importantly "If a value other than LDAP_SUCCESS is returned, the values of all the result parameters are undefined." So if you somehow got hold of an aberrant chain with more than one result in it, our ldap_parse_result() would parse the first result (as expected) and then discover the subsequent result, then return LDAP_MORE_RESULTS_TO_RETURN which would totally invalidate all the parsing it did on the first result.

Obviously trying to make sense out of things based on an old broken API spec may not be very fruitful. But one way or another it should make more sense than it currently does.

--
 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/