]> git.sur5r.net Git - openldap/commitdiff
Update error reporting
authorKurt Zeilenga <kurt@openldap.org>
Wed, 11 Oct 2000 04:46:47 +0000 (04:46 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 11 Oct 2000 04:46:47 +0000 (04:46 +0000)
CHANGES
servers/slapd/entry.c
servers/slapd/tools/slapadd.c

diff --git a/CHANGES b/CHANGES
index 2d5b33cb603aba4ea8e7b9e08677ad89ad3239e3..e2359e88626e19483c5f11c583789a835734cab5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@ OpenLDAP 2.0.X Engineering
        Fixed slapd ACL nameuid bug
        Updated -lldap SASL error reporting
        Updated -lldap TLS error reporting
+       Updated slapadd error reporting
        Added slapd numericString indexing
        Build Environment
                Fixed make comment bug (ITS#811)
index 9ce6f74d98e63b4b844119c537ff99289d4e7491..b52e518a80266dddfd0e0b868b7050386f7b57e5 100644 (file)
@@ -65,7 +65,7 @@ str2entry( char *s )
        e = (Entry *) ch_malloc( sizeof(Entry) );
 
        if( e == NULL ) {
-               Debug( LDAP_DEBUG_TRACE,
+               Debug( LDAP_DEBUG_ANY,
                    "<= str2entry NULL (entry allocation failed)\n",
                    0, 0, 0 );
                return( NULL );
@@ -114,7 +114,8 @@ str2entry( char *s )
                rc = slap_str2ad( type, &ad, &text );
 
                if( rc != LDAP_SUCCESS ) {
-                       Debug( LDAP_DEBUG_TRACE,
+                       Debug( slapMode & SLAP_TOOL_MODE
+                               ? LDAP_DEBUG_ANY : LDAP_DEBUG_TRACE,
                                "<= str2entry: str2ad(%s): %s\n", type, text, 0 );
 
                        if( slapMode & SLAP_TOOL_MODE ) {
@@ -127,7 +128,7 @@ str2entry( char *s )
                        rc = slap_str2undef_ad( type, &ad, &text );
 
                        if( rc != LDAP_SUCCESS ) {
-                               Debug( LDAP_DEBUG_TRACE,
+                               Debug( LDAP_DEBUG_ANY,
                                        "<= str2entry: str2undef_ad(%s): %s\n",
                                                type, text, 0 );
                                entry_free( e );
@@ -157,7 +158,7 @@ str2entry( char *s )
                        rc = validate( ad->ad_type->sat_syntax, &value );
 
                        if( rc != 0 ) {
-                               Debug( LDAP_DEBUG_TRACE,
+                               Debug( LDAP_DEBUG_ANY,
                                        "str2entry: invalid value for syntax %s\n",
                                        ad->ad_type->sat_syntax->ssyn_oid, 0, 0 );
                                entry_free( e );
@@ -172,7 +173,7 @@ str2entry( char *s )
                ad_free( ad, 1 );
 
                if( rc != 0 ) {
-                       Debug( LDAP_DEBUG_TRACE,
+                       Debug( LDAP_DEBUG_ANY,
                            "<= str2entry NULL (attr_merge)\n", 0, 0, 0 );
                        entry_free( e );
                        free( value.bv_val );
index 57623649042ae41dc9dac117d7d3c780af13b678..8ce9f1a5345235062d87f9afd651c663661c1f22 100644 (file)
@@ -79,9 +79,11 @@ main( int argc, char **argv )
 
                /* check backend */
                if( select_backend( e->e_ndn ) != be ) {
-                       fprintf( stderr, "%s: database not configured to "
+                       fprintf( stderr, "%s: database (%s) not configured to "
                                "hold dn=\"%s\" (line=%d)\n",
-                               progname, e->e_dn, lineno );
+                               progname,
+                               be ? be->be_suffix[0] : "<none>",
+                               e->e_dn, lineno );
                        rc = EXIT_FAILURE;
                        entry_free( e );
                        if( continuemode ) continue;