)
{
struct monitorinfo *mi = (struct monitorinfo *) be->be_private;
- int rc;
+ int rc = LDAP_SUCCESS;
Entry *e, *matched = NULL;
int nentries = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "monitor_back_search: enter\n" ));
+ LDAP_LOG( BACK_MON, ENTRY,
+ "monitor_back_search: enter\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "=> monitor_back_search\n%s%s%s", "", "", "");
#endif
monitor_cache_release( mi, matched );
}
- return( 0 );
+ return( rc );
}
nentries = 0;
attrsonly, NULL );
nentries = 1;
}
+ rc = LDAP_SUCCESS;
monitor_cache_release( mi, e );
break;
attrs, attrsonly,
e, 0, &nentries );
if ( rc ) {
- // error
+ rc = LDAP_OTHER;
}
break;
attrs, attrsonly,
e, 1, &nentries );
if ( rc ) {
- // error
+ rc = LDAP_OTHER;
}
break;
}
- send_search_result( conn, op, LDAP_SUCCESS,
+ send_search_result( conn, op, rc,
NULL, NULL, NULL, NULL, nentries );
- return( 0 );
+ return( rc == LDAP_SUCCESS ? 0 : 1 );
}