>>> On 2/20/2007 at 11:32 AM, in message
<[EMAIL PROTECTED]>, "Jeff Trawick"
<[EMAIL PROTECTED]> wrote:
> On 2/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Author: bnicholes
>> Date: Tue Feb 20 08:23:19 2007
>> New Revision: 509629
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=509629 
>> Log:
>> vote
>>
>> Modified:
>>     httpd/httpd/branches/2.2.x/STATUS
>>
>> Modified: httpd/httpd/branches/2.2.x/STATUS
>> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?view=diff&rev=5
>  
> 09629&r1=509628&r2=509629
>> 
> =============================================================================
> =
>> --- httpd/httpd/branches/2.2.x/STATUS (original)
>> +++ httpd/httpd/branches/2.2.x/STATUS Tue Feb 20 08:23:19 2007
>> @@ -180,3 +180,9 @@
>>     * mod_ldap: Fix the search limit parameter to ldap_search_ext_s()
>>       http://svn.apache.org/viewvc?view=rev&rev=509237 
>>       +1: trawick
>> +     -0: bnicholes - The patch as it stands, could cause unpredictible
>> +          behavior across SDKs depending on whether or not the SDK
>> +         has defined LDAP_NO_LIMIT. The behavior of the ldap_search_ext_s()
>> +         call can be different if the sizelimit parameter is 0 vs -1.
>> +         At the very least, the patch needs to be revised so that the
>> +         behavior is common across all SDKs.
> 
> Is this correct as far as you know?
> 
> . 0 always means no client API limit
> . LDAP_NO_LIMIT, when defined, means no client API limit
> . when accepted as a parameter, -1 sometimes means some default
> (client API default?) and sometimes means unlimited (VERY UNCLEAR TO
> ME)
> . the search is always limited by the server limit, no matter what is
> specified in the clien

Yes, the point of using LDAP_NO_LIMIT in the ldap_search_ext_s() call is to 
override the limit that was set in the session using LDAP_OPT_LIMITSIZE.  
AFAIK, a -1 will defer to the session setting where a 0 will specify unlimited 
no matter what (of course as you mentioned the search will always be limited by 
the server limit).  According to the documentation, this is how the Novell SDK 
works.  I would assume that since we have been passing a -1 into OpenLDAP 
without complaint, it is also working this way even through there isn't #define 
for LDAP_DEFAULT_SIZELIMIT -1.  The point being that the patch assumes that 0 
and -1 are equivalent, but they aren't.

Brad

Reply via email to