Merge branch 'paging_control' of https://github.com/Jamstah/ruby-net-ldap into jamstah-paging_control

This commit is contained in:
Austin Ziegler 2011-03-17 22:28:47 -04:00
commit 013c13f7e1

View file

@ -1381,14 +1381,15 @@ class Net::LDAP::Connection #:nodoc:
search_attributes.to_ber_sequence search_attributes.to_ber_sequence
].to_ber_appsequence(3) ].to_ber_appsequence(3)
controls = [ controls = []
controls <<
[ [
Net::LDAP::LdapControls::PagedResults.to_ber, Net::LDAP::LdapControls::PagedResults.to_ber,
# Criticality MUST be false to interoperate with normal LDAPs. # Criticality MUST be false to interoperate with normal LDAPs.
false.to_ber, false.to_ber,
rfc2696_cookie.map{ |v| v.to_ber}.to_ber_sequence.to_s.to_ber rfc2696_cookie.map{ |v| v.to_ber}.to_ber_sequence.to_s.to_ber
].to_ber_sequence ].to_ber_sequence if paged_searches_supported
].to_ber_contextspecific(0) controls = controls.to_ber_contextspecific(0)
pkt = [next_msgid.to_ber, request, controls].to_ber_sequence pkt = [next_msgid.to_ber, request, controls].to_ber_sequence
@conn.write pkt @conn.write pkt