]> git.sur5r.net Git - openldap/commitdiff
make messages more esplicative; fix style
authorPierangelo Masarati <ando@openldap.org>
Sat, 22 Nov 2008 17:53:14 +0000 (17:53 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 22 Nov 2008 17:53:14 +0000 (17:53 +0000)
servers/slapd/back-bdb/dn2id.c
servers/slapd/back-bdb/modify.c

index fd557ea29488fa59d473253ddaedeb28c05c8e19..ccf7d0c56ae83c16710e32212300f8a9ff64376a 100644 (file)
@@ -89,8 +89,11 @@ bdb_dn2id_add(
        /* store it -- don't override */
        rc = db->put( db, txn, &key, &data, DB_NOOVERWRITE );
        if( rc != 0 ) {
-               Debug( LDAP_DEBUG_ANY, "=> bdb_dn2id_add 0x%lx: put failed: %s %d\n",
-                       e->e_id, db_strerror(rc), rc );
+               char buf[ SLAP_TEXT_BUFLEN ];
+               snprintf( buf, sizeof( buf ), "%s => bdb_dn2id_add dn=\"%s\" ID=0x%lx",
+                       op->o_log_prefix, e->e_name.bv_val, e->e_id );
+               Debug( LDAP_DEBUG_ANY, "%s: put failed: %s %d\n",
+                       buf, db_strerror(rc), rc );
                goto done;
        }
 
index 0ae77b443e02c5bcc89b4e61215fa5619a2a96cb..f3f1bb144af87f96de4bf01e2dd13aa03a0740af 100644 (file)
@@ -290,8 +290,8 @@ int bdb_modify_internal(
                                        attrs_free( e->e_attrs );
                                        e->e_attrs = save_attrs;
                                        Debug( LDAP_DEBUG_ANY,
-                                                  "Attribute index delete failure",
-                                                  0, 0, 0 );
+                                               "%s: attribute \"%s\" index delete failure\n",
+                                               op->o_log_prefix, ap->a_desc->ad_cname.bv_val, 0 );
                                        return rc;
                                }
                        }
@@ -309,8 +309,8 @@ int bdb_modify_internal(
                                attrs_free( e->e_attrs );
                                e->e_attrs = save_attrs;
                                Debug( LDAP_DEBUG_ANY,
-                                      "Attribute index add failure",
-                                      0, 0, 0 );
+                                      "%s: attribute \"%s\" index add failure\n",
+                                       op->o_log_prefix, ap->a_desc->ad_cname.bv_val, 0 );
                                return rc;
                        }
                }