diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-09-24 12:07:16 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-25 10:38:45 -0700 |
commit | f4893e7d33b7c9aaafba5ce8657972d3eb600257 (patch) | |
tree | 272feafb24baf123578161ac58524393138e4270 /source4/lib/ldb/include | |
parent | d72dbe847e0db605e950e6656d758cb60bf628a7 (diff) | |
download | samba-f4893e7d33b7c9aaafba5ce8657972d3eb600257.tar.gz samba-f4893e7d33b7c9aaafba5ce8657972d3eb600257.tar.bz2 samba-f4893e7d33b7c9aaafba5ce8657972d3eb600257.zip |
ldb: added request location tracking
this is used to help debug async ldb requests. The ldb request handle
now contains a location string and the parent request pointer. This
allows us to print a backtrace of ldb requests in the dsdb modules.
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r-- | source4/lib/ldb/include/ldb.h | 7 | ||||
-rw-r--r-- | source4/lib/ldb/include/ldb_private.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index 55a6fd1c37..4bc793b9cc 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -2132,4 +2132,11 @@ struct ldb_dn *ldb_dn_binary_from_ldb_val(TALLOC_CTX *mem_ctx, int ldb_dn_get_binary(struct ldb_dn *dn, struct ldb_val *val); int ldb_dn_set_binary(struct ldb_dn *dn, struct ldb_val *val); +/* debugging functions for ldb requests */ +void ldb_req_set_location(struct ldb_request *req, const char *location); +const char *ldb_req_location(struct ldb_request *req); + +/* set the location marker on a request handle - used for debugging */ +#define LDB_REQ_SET_LOCATION(req) ldb_req_set_location(req, __location__) + #endif diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index 6bbcfa280d..c8efb6bbc5 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -55,6 +55,10 @@ struct ldb_handle { struct ldb_context *ldb; unsigned flags; unsigned nesting; + + /* used for debugging */ + struct ldb_request *parent; + const char *location; }; /* basic module structure */ |