summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-03 09:39:15 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-03 09:29:46 +0000
commit598b565980a02a8909e3738c17fc503f83efe45e (patch)
tree395fc57ee2a6bfdacf6df7c25a2c70a21e0c3a37 /source4/dsdb/samdb/ldb_modules
parent4902b71a607a0899d1a2d65b80eebdc121f4ef1d (diff)
downloadsamba-598b565980a02a8909e3738c17fc503f83efe45e.tar.gz
samba-598b565980a02a8909e3738c17fc503f83efe45e.tar.bz2
samba-598b565980a02a8909e3738c17fc503f83efe45e.zip
s4:objectguid LDB module - remove "objectguid_find_attribute"
It's exactly the same as "ldb_msg_find_element". In addition remove a comment which points out a "fixme" for a semi-async call since we started to permit them again. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Wed Nov 3 09:29:46 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectguid.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectguid.c b/source4/dsdb/samdb/ldb_modules/objectguid.c
index b5d814ec28..28d253a0d1 100644
--- a/source4/dsdb/samdb/ldb_modules/objectguid.c
+++ b/source4/dsdb/samdb/ldb_modules/objectguid.c
@@ -35,19 +35,6 @@
#include "librpc/gen_ndr/ndr_misc.h"
#include "param/param.h"
-static struct ldb_message_element *objectguid_find_attribute(const struct ldb_message *msg, const char *name)
-{
- unsigned int i;
-
- for (i = 0; i < msg->num_elements; i++) {
- if (ldb_attr_cmp(name, msg->elements[i].name) == 0) {
- return &msg->elements[i];
- }
- }
-
- return NULL;
-}
-
/*
add a time element to a record
*/
@@ -140,7 +127,6 @@ static int objectguid_add(struct ldb_module *module, struct ldb_request *req)
{
struct ldb_context *ldb;
struct ldb_request *down_req;
- struct ldb_message_element *attribute;
struct ldb_message *msg;
struct GUID guid;
uint64_t seq_num;
@@ -157,7 +143,7 @@ static int objectguid_add(struct ldb_module *module, struct ldb_request *req)
return ldb_next_request(module, req);
}
- if ((attribute = objectguid_find_attribute(req->op.add.message, "objectGUID")) != NULL ) {
+ if (ldb_msg_find_element(req->op.add.message, "objectGUID") != NULL) {
return ldb_next_request(module, req);
}
@@ -189,8 +175,6 @@ static int objectguid_add(struct ldb_module *module, struct ldb_request *req)
}
/* Get a sequence number from the backend */
- /* FIXME: ldb_sequence_number is a semi-async call,
- * make sure this function is split and a callback is used */
ret = ldb_sequence_number(ldb, LDB_SEQ_NEXT, &seq_num);
if (ret == LDB_SUCCESS) {
if (add_uint64_element(ldb, msg, "uSNCreated",