diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-06 09:55:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:46 -0500 |
commit | 68293565de0b799dcc51e001dabf53adf88ee7ad (patch) | |
tree | cc8710f307f2f4ed31bd5d4fdd1e17433fc692a5 /source4/lib/ldb/common/ldb_ldif.c | |
parent | 404c319a5013132edf402e18da0144d7566d2623 (diff) | |
download | samba-68293565de0b799dcc51e001dabf53adf88ee7ad.tar.gz samba-68293565de0b799dcc51e001dabf53adf88ee7ad.tar.bz2 samba-68293565de0b799dcc51e001dabf53adf88ee7ad.zip |
r513: added a generic ldb debug system to allow the Samba debug functions to
be cleanly interfaced to ldb
(This used to be commit 74b89d5f960d6b936751e3f057b4540eb80b79cd)
Diffstat (limited to 'source4/lib/ldb/common/ldb_ldif.c')
-rw-r--r-- | source4/lib/ldb/common/ldb_ldif.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c index 451276c48d..513e2dd365 100644 --- a/source4/lib/ldb/common/ldb_ldif.c +++ b/source4/lib/ldb/common/ldb_ldif.c @@ -217,7 +217,8 @@ int ldif_write(struct ldb_context *ldb, } } if (!ldb_changetypes[i].name) { - fprintf(stderr,"Invalid changetype\n"); + ldb_debug(ldb, LDB_DEBUG_ERROR, "Error: Invalid ldif changetype %d\n", + ldif->changetype); return -1; } ret = fprintf_fn(private_data, "changetype: %s\n", ldb_changetypes[i].name); @@ -493,7 +494,8 @@ struct ldb_ldif *ldif_read(struct ldb_context *ldb, /* first line must be a dn */ if (ldb_attr_cmp(attr, "dn") != 0) { - fprintf(stderr, "First line must be a dn not '%s'\n", attr); + ldb_debug(ldb, LDB_DEBUG_ERROR, "Error: First line of ldif must be a dn not '%s'\n", + attr); goto failed; } @@ -512,8 +514,8 @@ struct ldb_ldif *ldif_read(struct ldb_context *ldb, } } if (!ldb_changetypes[i].name) { - fprintf(stderr,"Bad changetype '%s'\n", - (char *)value.data); + ldb_debug(ldb, LDB_DEBUG_ERROR, + "Error: Bad ldif changetype '%s'\n",(char *)value.data); } flags = 0; continue; |