summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-21 18:15:19 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-22 17:10:05 -0700
commit2e98ee0907474990e2929c892f5ead731d7ddb34 (patch)
tree414c7d36736a0787e3e54228646fe55e8a067d0f /source4/lib/ldb/common/ldb.c
parentec5d01278a6f38f76eb6edfa2e9bfb2fc8eb6fbe (diff)
downloadsamba-2e98ee0907474990e2929c892f5ead731d7ddb34.tar.gz
samba-2e98ee0907474990e2929c892f5ead731d7ddb34.tar.bz2
samba-2e98ee0907474990e2929c892f5ead731d7ddb34.zip
s4-ldb: only show the outer level of ldb ops when tracing
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index e93560e559..ba88e6cd64 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -635,7 +635,8 @@ static void ldb_trace_request(struct ldb_context *ldb, struct ldb_request *req)
case LDB_SEARCH:
ldb_debug_add(ldb, "ldb_trace_request: SEARCH\n");
ldb_debug_add(ldb, " dn: %s\n",
- ldb_dn_get_linearized(req->op.search.base));
+ ldb_dn_is_null(req->op.search.base)?"<rootDSE>":
+ ldb_dn_get_linearized(req->op.search.base));
ldb_debug_add(ldb, " scope: %s\n",
req->op.search.scope==LDB_SCOPE_BASE?"base":
req->op.search.scope==LDB_SCOPE_ONELEVEL?"one":
@@ -921,6 +922,10 @@ int ldb_build_search_req_ex(struct ldb_request **ret_req,
return LDB_ERR_OPERATIONS_ERROR;
}
+ if (parent) {
+ req->handle->nesting++;
+ }
+
*ret_req = req;
return LDB_SUCCESS;
}
@@ -988,6 +993,10 @@ int ldb_build_add_req(struct ldb_request **ret_req,
return LDB_ERR_OPERATIONS_ERROR;
}
+ if (parent) {
+ req->handle->nesting++;
+ }
+
*ret_req = req;
return LDB_SUCCESS;
@@ -1026,6 +1035,10 @@ int ldb_build_mod_req(struct ldb_request **ret_req,
return LDB_ERR_OPERATIONS_ERROR;
}
+ if (parent) {
+ req->handle->nesting++;
+ }
+
*ret_req = req;
return LDB_SUCCESS;
@@ -1064,6 +1077,10 @@ int ldb_build_del_req(struct ldb_request **ret_req,
return LDB_ERR_OPERATIONS_ERROR;
}
+ if (parent) {
+ req->handle->nesting++;
+ }
+
*ret_req = req;
return LDB_SUCCESS;
@@ -1104,6 +1121,10 @@ int ldb_build_rename_req(struct ldb_request **ret_req,
return LDB_ERR_OPERATIONS_ERROR;
}
+ if (parent) {
+ req->handle->nesting++;
+ }
+
*ret_req = req;
return LDB_SUCCESS;
@@ -1173,6 +1194,10 @@ int ldb_build_extended_req(struct ldb_request **ret_req,
return LDB_ERR_OPERATIONS_ERROR;
}
+ if (parent) {
+ req->handle->nesting++;
+ }
+
*ret_req = req;
return LDB_SUCCESS;