From: Kurt Zeilenga Date: Wed, 26 Dec 2001 23:03:36 +0000 (+0000) Subject: Fix modrdn and other misc cleanup X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~478 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=93fb01e2f09250400224b5ff0b937265068eb409;p=openldap Fix modrdn and other misc cleanup --- diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index c2be3c73e9..3c3fd0dfd7 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -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 */ diff --git a/servers/slapd/back-monitor/Makefile.in b/servers/slapd/back-monitor/Makefile.in index 1cdce32ce8..afc3782eee 100644 --- a/servers/slapd/back-monitor/Makefile.in +++ b/servers/slapd/back-monitor/Makefile.in @@ -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