diff options
author | Simo Sorce <idra@samba.org> | 2006-01-10 17:19:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:50:04 -0500 |
commit | 5ecc64dcab1089cf134a264de28aca0b21100cca (patch) | |
tree | 988a093e31443918a55c035ffaca1905b1200d12 /source4/lib/ldb/tools/cmdline.c | |
parent | 720041d07894080080c12d17b49524a0a184b1f4 (diff) | |
download | samba-5ecc64dcab1089cf134a264de28aca0b21100cca.tar.gz samba-5ecc64dcab1089cf134a264de28aca0b21100cca.tar.bz2 samba-5ecc64dcab1089cf134a264de28aca0b21100cca.zip |
r12833: complete ldbsearch support for controls
now the three supported controls (paged_results,
server_sort, extended_dn) are fully functional
and the infrastructure to add more is in place.
valgrind is happy too :)
Simo.
(This used to be commit bd8e2629378700198e16287823970f52d1150a86)
Diffstat (limited to 'source4/lib/ldb/tools/cmdline.c')
-rw-r--r-- | source4/lib/ldb/tools/cmdline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index 9b24b83239..ee9e5f5e47 100644 --- a/source4/lib/ldb/tools/cmdline.c +++ b/source4/lib/ldb/tools/cmdline.c @@ -141,10 +141,10 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const case 'c': { const char *cs = poptGetOptArg(pc); - const char *p; + const char *p, *q; int cc; - for (p = cs, cc = 1; (p = strchr(p, ',')); cc++) ; + for (p = cs, cc = 1; (q = strchr(p, ',')); cc++, p = q + 1) ; options.controls = talloc_array(ret, char *, cc + 1); if (options.controls == NULL) { @@ -163,7 +163,7 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const p = t + 1; } } - options.controls[cc + 1] = NULL; + options.controls[cc] = NULL; break; } |