summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-18 18:13:17 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-18 18:16:31 +0200
commitd673b49dfcd75f723b39fbc914d69caae4b96237 (patch)
treed8aaa03395fa1eee4eb114c392da48eb3da20368 /source4
parent9d097fa0e0ccb558a55f65376fedeb041c4d57ac (diff)
downloadsamba-d673b49dfcd75f723b39fbc914d69caae4b96237.tar.gz
samba-d673b49dfcd75f723b39fbc914d69caae4b96237.tar.bz2
samba-d673b49dfcd75f723b39fbc914d69caae4b96237.zip
s4:ldb_msg_check_string_attribute - add a comment about the result values
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/common/ldb_msg.c6
-rw-r--r--source4/lib/ldb/include/ldb.h9
2 files changed, 14 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index bf607fd4e6..a8ea52b0b1 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -890,7 +890,11 @@ void ldb_dump_results(struct ldb_context *ldb, struct ldb_result *result, FILE *
}
}
-int ldb_msg_check_string_attribute(const struct ldb_message *msg, const char *name, const char *value)
+/*
+ checks for a string attribute. Returns "1" on match and otherwise "0".
+*/
+int ldb_msg_check_string_attribute(const struct ldb_message *msg,
+ const char *name, const char *value)
{
struct ldb_message_element *el;
struct ldb_val val;
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 69d052b0eb..2511fecefb 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -1807,6 +1807,15 @@ struct ldb_message *ldb_msg_diff(struct ldb_context *ldb,
struct ldb_message *msg1,
struct ldb_message *msg2);
+/**
+ Tries to find a certain string attribute in a message
+
+ \param msg the message to check
+ \param name attribute name
+ \param value attribute value
+
+ \return 1 on match and 0 otherwise.
+*/
int ldb_msg_check_string_attribute(const struct ldb_message *msg,
const char *name,
const char *value);