]> git.sur5r.net Git - openldap/commitdiff
Fix modrdn and other misc cleanup
authorKurt Zeilenga <kurt@openldap.org>
Wed, 26 Dec 2001 23:03:36 +0000 (23:03 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 26 Dec 2001 23:03:36 +0000 (23:03 +0000)
servers/slapd/back-ldbm/modrdn.c
servers/slapd/back-monitor/Makefile.in

index c2be3c73e9a8bd98ec723ece3d63590bd9f6b2d1..3c3fd0dfd756b001e9e1f876936da9f8045e063c 100644 (file)
@@ -82,12 +82,14 @@ ldbm_back_modrdn(
        LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
                "ldbm_back_modrdn: dn: %s newSuperior=%s\n", 
                dn->bv_len ? dn->bv_val : "NULL",
-               newSuperior->bv_len ? newSuperior->bv_val : "NULL" ));
+               ( newSuperior && newSuperior->bv_len )
+                       ? newSuperior->bv_val : "NULL" ));
 #else
        Debug( LDAP_DEBUG_TRACE,
                "==>ldbm_back_modrdn: dn: %s newSuperior=%s\n", 
                dn->bv_len ? dn->bv_val : "NULL",
-               newSuperior->bv_len ? newSuperior->bv_val : "NULL", 0 );
+               ( newSuperior && newSuperior->bv_len )
+                       ? newSuperior->bv_val : "NULL", 0 );
 #endif
 
        /* get entry with writer lock */
@@ -272,11 +274,12 @@ ldbm_back_modrdn(
        if ( newSuperior != NULL ) {
 #ifdef NEW_LOGGING
                LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
-                          "ldbm_back_modrdn: new parent \"%s\" requested\n", newSuperior ));
+                       "ldbm_back_modrdn: new parent \"%s\" requested\n",
+                       newSuperior->bv_val ));
 #else
                Debug( LDAP_DEBUG_TRACE, 
                        "ldbm_back_modrdn: new parent \"%s\" requested...\n",
-                       newSuperior, 0, 0 );
+                       newSuperior->bv_val, 0, 0 );
 #endif
 
                np_dn = ch_strdup( newSuperior->bv_val );
@@ -286,13 +289,15 @@ ldbm_back_modrdn(
                /* newSuperior == oldParent? */
                if ( strcmp( p_ndn, np_ndn ) == 0 ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
-                                  "ldbm_back_modrdn: new parent\"%s\" seems to be the same as the old parent \"%s\"\n",
-                                  newSuperior, p_dn ));
+                       LDAP_LOG(( "backend", LDAP_LEVEL_INFO, "ldbm_back_modrdn: "
+                               "new parent\"%s\" seems to be the same as the "
+                               "old parent \"%s\"\n",
+                               newSuperior->bv_val, p_dn ));
 #else
-                       Debug( LDAP_DEBUG_TRACE, 
-                              "ldbm_back_modrdn: new parent \"%s\" seems to be the same as old parent \"%s\"...\n",
-                              newSuperior, p_dn, 0 );
+                       Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: "
+                               "new parent\"%s\" seems to be the same as the "
+                               "old parent \"%s\"\n",
+                               newSuperior->bv_val, p_dn, 0 );
 #endif
 
                        newSuperior = NULL; /* ignore newSuperior */
@@ -307,11 +312,11 @@ ldbm_back_modrdn(
                        if( (np = dn2entry_w( be, np_ndn, NULL )) == NULL) {
 #ifdef NEW_LOGGING
                                LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
-                                          "ldbm_back_modrdn: newSup(ndn=%s) not found.\n", np_ndn ));
+                                       "ldbm_back_modrdn: newSup(ndn=%s) not found.\n", np_ndn ));
 #else
                                Debug( LDAP_DEBUG_TRACE,
-                                      "ldbm_back_modrdn: newSup(ndn=%s) not here!\n",
-                                      np_ndn, 0, 0);
+                                   "ldbm_back_modrdn: newSup(ndn=%s) not here!\n",
+                                   np_ndn, 0, 0);
 #endif
 
                                send_ldap_result( conn, op, LDAP_OTHER,
@@ -321,12 +326,12 @@ ldbm_back_modrdn(
 
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
-                                  "ldbm_back_modrdn: wr to new parent OK np=%p, id=%ld\n",
-                                  np, np->e_id ));
+                               "ldbm_back_modrdn: wr to new parent OK np=%p, id=%ld\n",
+                               np, np->e_id ));
 #else
                        Debug( LDAP_DEBUG_TRACE,
-                              "ldbm_back_modrdn: wr to new parent OK np=%p, id=%ld\n",
-                              np, np->e_id, 0 );
+                               "ldbm_back_modrdn: wr to new parent OK np=%p, id=%ld\n",
+                               np, np->e_id, 0 );
 #endif
 
                        /* check newSuperior for "children" acl */
index 1cdce32ce8be10e794b625201b47ca1a8ba8fba4..afc3782eee2fe89dd6ca325408a7265e031ddceb 100644 (file)
@@ -4,14 +4,12 @@ SRCS = init.c search.c compare.c abandon.c modify.c bind.c \
        operational.c \
        cache.c entry.c \
        backend.c database.c thread.c conn.c rww.c log.c \
-       operation.c sent.c \
-       dummy.c
+       operation.c sent.c
 OBJS = init.lo search.lo compare.lo abandon.lo modify.lo bind.lo \
        operational.lo \
        cache.lo entry.lo \
        backend.lo database.lo thread.lo conn.lo rww.lo log.lo \
-       operation.lo sent.lo \
-       dummy.lo
+       operation.lo sent.lo
 
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries