- if ( strcmp( nbase, LDAP_ROOT_DSE ) == 0 ) {
- root_dse_info( conn, op, attrs, attrsonly );
+ if( rc != LDAP_SUCCESS ) {
+ send_ldap_result( conn, op, rc,
+ NULL, text, NULL, NULL );
+ goto return_results;
+
+ } else if ( entry != NULL ) {
+ rc = test_filter( NULL, conn, op,
+ entry, filter );
+
+ if( rc == LDAP_COMPARE_TRUE ) {
+ send_search_entry( NULL, conn, op,
+ entry, an, attrsonly, NULL );
+ }
+ entry_free( entry );
+
+ send_ldap_result( conn, op, LDAP_SUCCESS,
+ NULL, NULL, NULL, NULL );
+