summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_modules.c
diff options
context:
space:
mode:
authorNadezhda Ivanova <nadezhda.ivanova@postpath.com>2009-09-21 17:29:28 -0700
committerNadezhda Ivanova <nadezhda.ivanova@postpath.com>2009-09-21 17:29:28 -0700
commit9e85192e6415fbaacf394330f6e61759190485ad (patch)
tree9e9a8c9d7fdd4dbcc471e69c4c4708eb6ae11dc3 /source4/lib/ldb/common/ldb_modules.c
parent10c6f3f71a4fe3e36e2a0476dc0077187371fafb (diff)
parentb850d7fb08b97fff8ce5ec2cbff2256aa390e440 (diff)
downloadsamba-9e85192e6415fbaacf394330f6e61759190485ad.tar.gz
samba-9e85192e6415fbaacf394330f6e61759190485ad.tar.bz2
samba-9e85192e6415fbaacf394330f6e61759190485ad.zip
Merge branch 'master' of git://git.samba.org/samba
Diffstat (limited to 'source4/lib/ldb/common/ldb_modules.c')
-rw-r--r--source4/lib/ldb/common/ldb_modules.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index 206b225ca8..c57d0e407d 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -672,6 +672,14 @@ int ldb_module_send_entry(struct ldb_request *req,
ares->controls = talloc_steal(ares, ctrls);
ares->error = LDB_SUCCESS;
+ if (req->handle->ldb->flags & LDB_FLG_ENABLE_TRACING) {
+ char *s;
+ ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "ldb_trace_response: ENTRY");
+ s = ldb_ldif_message_string(req->handle->ldb, msg, LDB_CHANGETYPE_NONE, msg);
+ ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "%s", s);
+ talloc_free(s);
+ }
+
return req->callback(req, ares);
}
@@ -697,6 +705,11 @@ int ldb_module_send_referral(struct ldb_request *req,
ares->referral = talloc_steal(ares, ref);
ares->error = LDB_SUCCESS;
+ if (req->handle->ldb->flags & LDB_FLG_ENABLE_TRACING) {
+ ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "ldb_trace_response: REFERRAL");
+ ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "ref: %s", ref);
+ }
+
return req->callback(req, ares);
}
@@ -729,6 +742,15 @@ int ldb_module_done(struct ldb_request *req,
req->handle->flags |= LDB_HANDLE_FLAG_DONE_CALLED;
+ if (req->handle->ldb->flags & LDB_FLG_ENABLE_TRACING) {
+ ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "ldb_trace_response: DONE");
+ ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "error: %u", error);
+ if (ldb_errstring(req->handle->ldb)) {
+ ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "msg: %s",
+ ldb_errstring(req->handle->ldb));
+ }
+ }
+
req->callback(req, ares);
return error;
}