mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Fix bug in last commit
This commit is contained in:
parent
433eb54dc7
commit
6ec6115119
@ -550,7 +550,7 @@ int structural_class(
|
|||||||
|
|
||||||
*scbv = ocs[scn];
|
*scbv = ocs[scn];
|
||||||
|
|
||||||
if( scbv->bv_len ) {
|
if( scbv->bv_len == 0 ) {
|
||||||
*text = "invalid structural object class";
|
*text = "invalid structural object class";
|
||||||
return LDAP_OBJECT_CLASS_VIOLATION;
|
return LDAP_OBJECT_CLASS_VIOLATION;
|
||||||
}
|
}
|
||||||
|
@ -119,13 +119,12 @@ main( int argc, char **argv )
|
|||||||
if( sc == NULL ) {
|
if( sc == NULL ) {
|
||||||
struct berval vals[2];
|
struct berval vals[2];
|
||||||
|
|
||||||
/* int ret = */
|
rc = structural_class( oc->a_vals, vals,
|
||||||
structural_class( oc->a_vals, vals,
|
|
||||||
NULL, &text, textbuf, textlen );
|
NULL, &text, textbuf, textlen );
|
||||||
|
|
||||||
if( vals[0].bv_len == 0 ) {
|
if( rc != LDAP_SUCCESS ) {
|
||||||
fprintf( stderr, "%s: dn=\"%s\" (line=%d): %s\n",
|
fprintf( stderr, "%s: dn=\"%s\" (line=%d): (%d) %s\n",
|
||||||
progname, e->e_dn, lineno, text );
|
progname, e->e_dn, lineno, rc, text );
|
||||||
rc = EXIT_FAILURE;
|
rc = EXIT_FAILURE;
|
||||||
entry_free( e );
|
entry_free( e );
|
||||||
if( continuemode ) continue;
|
if( continuemode ) continue;
|
||||||
@ -141,8 +140,8 @@ main( int argc, char **argv )
|
|||||||
rc = entry_schema_check( be, e, NULL, &text, textbuf, textlen );
|
rc = entry_schema_check( be, e, NULL, &text, textbuf, textlen );
|
||||||
|
|
||||||
if( rc != LDAP_SUCCESS ) {
|
if( rc != LDAP_SUCCESS ) {
|
||||||
fprintf( stderr, "%s: dn=\"%s\" (line=%d): %s\n",
|
fprintf( stderr, "%s: dn=\"%s\" (line=%d): (%d) %s\n",
|
||||||
progname, e->e_dn, lineno, text );
|
progname, e->e_dn, lineno, rc, text );
|
||||||
rc = EXIT_FAILURE;
|
rc = EXIT_FAILURE;
|
||||||
entry_free( e );
|
entry_free( e );
|
||||||
if( continuemode ) continue;
|
if( continuemode ) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user