git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e6a90d
)
r12157: ldb_dump_results() is useful to call from within gdb, so you can see a
author
Andrew Tridgell
<tridge@samba.org>
Fri, 9 Dec 2005 23:40:14 +0000
(23:40 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:47:15 +0000
(13:47 -0500)
set of results
(This used to be commit
2be62eb2dde9250f8bfe3a3272851e152a1d6b68
)
source4/lib/ldb/common/ldb_msg.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/common/ldb_msg.c
b/source4/lib/ldb/common/ldb_msg.c
index f4a49e47ce1516c0e6b33b1a5559609666684842..269599818c754db1e3211abfd1112bb148270955 100644
(file)
--- a/
source4/lib/ldb/common/ldb_msg.c
+++ b/
source4/lib/ldb/common/ldb_msg.c
@@
-671,3
+671,20
@@
time_t ldb_string_to_time(const char *s)
return timegm(&tm);
}
+
+/*
+ dump a set of results to a file. Useful from within gdb
+*/
+void ldb_dump_results(struct ldb_context *ldb, struct ldb_result *result, FILE *f)
+{
+ int i;
+
+ for (i = 0; i < result->count; i++) {
+ struct ldb_ldif ldif;
+ fprintf(f, "# record %d\n", i+1);
+ ldif.changetype = LDB_CHANGETYPE_NONE;
+ ldif.msg = result->msgs[i];
+ ldb_ldif_write_file(ldb, f, &ldif);
+ }
+}
+