summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-12 05:56:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:20:08 -0500
commit7c78ec0e145064696552d750eaaa70f00a0882e8 (patch)
treec893bc90876914f65768d12e6df0ad6ef3c15c9b /source4/lib/ldb/common
parent9570e24df1397f31dbd7c8436928749da9fc378c (diff)
downloadsamba-7c78ec0e145064696552d750eaaa70f00a0882e8.tar.gz
samba-7c78ec0e145064696552d750eaaa70f00a0882e8.tar.bz2
samba-7c78ec0e145064696552d750eaaa70f00a0882e8.zip
r8342: allow ldb_ldif_read_string() to continue in the string, so you can
read multiple records (This used to be commit 4b11c00421b5152fd7d4be0be0db983bb310021d)
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index 79ec857cbd..463bae483b 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -728,11 +728,14 @@ static int fgetc_string(void *private_data)
return EOF;
}
-struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char *s)
+struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char **s)
{
struct ldif_read_string_state state;
- state.s = s;
- return ldb_ldif_read(ldb, fgetc_string, &state);
+ struct ldb_ldif *ldif;
+ state.s = *s;
+ ldif = ldb_ldif_read(ldb, fgetc_string, &state);
+ *s = state.s;
+ return ldif;
}