{
ID id;
int rc = EXIT_SUCCESS;
+ int result = EXIT_SUCCESS;
const char *progname = "slapschema";
Connection conn = { 0 };
OperationBuffer opbuf;
e = be->be_entry_get( be, id );
if ( e == NULL ) {
printf("# no data for entry id=%08lx\n\n", (long) id );
- rc = EXIT_FAILURE;
+ result = EXIT_FAILURE;
if( continuemode ) continue;
break;
}
if ( filter != NULL ) {
int rc = test_filter( NULL, e, filter );
if ( rc != LDAP_COMPARE_TRUE ) {
+ result = rc;
be_entry_release_r( op, e );
continue;
}
text ? ": " : "",
text ? text : "" );
fprintf( ldiffp->fp, "dn: %s\n\n", e->e_name.bv_val );
+ result = rc;
}
be_entry_release_r( op, e );
+ if ( result != LDAP_SUCCESS && !continuemode ) {
+ break;
+ }
}
be->be_entry_close( be );
if ( slap_tool_destroy() )
- rc = EXIT_FAILURE;
+ result = EXIT_FAILURE;
- return rc;
+ return result;
}