diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-21 16:29:44 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-21 16:31:06 -0700 |
commit | 1fa643bdd731ffa6bc746bce0be5fa0f117b48d2 (patch) | |
tree | db9c5a68f85fbb32df98b33ed5d50fb80f9f58d3 /source4 | |
parent | 4d984d0c05c8517aafa1aefcb73e46c63375ef51 (diff) | |
download | samba-1fa643bdd731ffa6bc746bce0be5fa0f117b48d2.tar.gz samba-1fa643bdd731ffa6bc746bce0be5fa0f117b48d2.tar.bz2 samba-1fa643bdd731ffa6bc746bce0be5fa0f117b48d2.zip |
s4-ldb: bit prettier output
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 2ad5905318..02298c1dff 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -642,8 +642,12 @@ static void ldb_trace_request(struct ldb_context *ldb, struct ldb_request *req) req->op.search.scope==LDB_SCOPE_SUBTREE?"sub":"UNKNOWN"); ldb_debug(ldb, LDB_DEBUG_TRACE, " expr: %s", ldb_filter_from_tree(tmp_ctx, req->op.search.tree)); - for (i=0; req->op.search.attrs && req->op.search.attrs[i]; i++) { - ldb_debug(ldb, LDB_DEBUG_TRACE, " attr: %s", req->op.search.attrs[i]); + if (req->op.search.attrs == NULL) { + ldb_debug(ldb, LDB_DEBUG_TRACE, " attr: <ALL>"); + } else { + for (i=0; req->op.search.attrs[i]; i++) { + ldb_debug(ldb, LDB_DEBUG_TRACE, " attr: %s", req->op.search.attrs[i]); + } } break; case LDB_DELETE: @@ -691,11 +695,15 @@ static void ldb_trace_request(struct ldb_context *ldb, struct ldb_request *req) break; } - for (i=0; req->controls && req->controls[i]; i++) { - ldb_debug(ldb, LDB_DEBUG_TRACE, " control: %s crit:%u data:%s", - req->controls[i]->oid, - req->controls[i]->critical, - req->controls[i]->data?"yes":"no"); + if (req->controls == NULL) { + ldb_debug(ldb, LDB_DEBUG_TRACE, " control: <NONE>"); + } else { + for (i=0; req->controls && req->controls[i]; i++) { + ldb_debug(ldb, LDB_DEBUG_TRACE, " control: %s crit:%u data:%s", + req->controls[i]->oid, + req->controls[i]->critical, + req->controls[i]->data?"yes":"no"); + } } talloc_free(tmp_ctx); |