diff options
author | Simo Sorce <idra@samba.org> | 2006-10-25 01:42:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:24:38 -0500 |
commit | 7f833458ca0083654e34cbfde1c6c6510cab1826 (patch) | |
tree | 0e2d7a740b8c29896ed7ee5635d2520b9913945e /source4/lib/ldb/modules/objectclass.c | |
parent | 3cee746a3f23f1040daa60d1208145bff87b3d01 (diff) | |
download | samba-7f833458ca0083654e34cbfde1c6c6510cab1826.tar.gz samba-7f833458ca0083654e34cbfde1c6c6510cab1826.tar.bz2 samba-7f833458ca0083654e34cbfde1c6c6510cab1826.zip |
r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth argument.
This is a pointer to an element pointer. If it is not null it will be
filled with the pointer of the manipulated element.
Will avoid double searches on the elements list in some cases.
(This used to be commit 0fa5d4bc225b83e9f63ac6d75bffc4c08eb6b620)
Diffstat (limited to 'source4/lib/ldb/modules/objectclass.c')
-rw-r--r-- | source4/lib/ldb/modules/objectclass.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/modules/objectclass.c b/source4/lib/ldb/modules/objectclass.c index e4040a8e3d..191238f9c9 100644 --- a/source4/lib/ldb/modules/objectclass.c +++ b/source4/lib/ldb/modules/objectclass.c @@ -250,7 +250,7 @@ static int objectclass_add(struct ldb_module *module, struct ldb_request *req) } ldb_msg_remove_attr(msg, "objectClass"); - ret = ldb_msg_add_empty(msg, "objectClass", 0); + ret = ldb_msg_add_empty(msg, "objectClass", 0, NULL); if (ret != LDB_SUCCESS) { talloc_free(mem_ctx); @@ -351,7 +351,7 @@ static int objectclass_modify(struct ldb_module *module, struct ldb_request *req * because we need it sorted */ ldb_msg_remove_attr(msg, "objectClass"); - ret = ldb_msg_add_empty(msg, "objectClass", LDB_FLAG_MOD_REPLACE); + ret = ldb_msg_add_empty(msg, "objectClass", LDB_FLAG_MOD_REPLACE, NULL); if (ret != LDB_SUCCESS) { talloc_free(mem_ctx); @@ -537,7 +537,7 @@ static int objectclass_do_mod(struct ldb_handle *h) { * We could do a constrained add/del, but we are meant to be * in a transaction... */ - ret = ldb_msg_add_empty(msg, "objectClass", LDB_FLAG_MOD_REPLACE); + ret = ldb_msg_add_empty(msg, "objectClass", LDB_FLAG_MOD_REPLACE, NULL); if (ret != LDB_SUCCESS) { ldb_set_errstring(ac->module->ldb, "objectclass: could not clear objectclass in modify msg"); talloc_free(mem_ctx); |