- if (( ber = ldap_build_search_req( ld, ludp->lud_dn, ludp->lud_scope,
- ludp->lud_filter, ludp->lud_attrs, attrsonly )) == NULLBER ) {
+ ber = ldap_build_search_req( ld, ludp->lud_dn, ludp->lud_scope,
+ ludp->lud_filter, ludp->lud_attrs, attrsonly, NULL, NULL,
+ -1, -1 );
+
+ if ( ber == NULL ) {