summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-23 10:13:56 +0100
committerAndrew Bartlett <abartlet@samba.org>2011-03-01 06:29:03 +0100
commitc807911bf7f6906b3f89633cc7359ecff3fecb23 (patch)
tree9e0682fb20d649e8bbb4dee2d23f970a95366d3f /source4/dsdb
parentcbef9c352a43f1ae31326f970b2b3f3334b6593d (diff)
downloadsamba-c807911bf7f6906b3f89633cc7359ecff3fecb23.tar.gz
samba-c807911bf7f6906b3f89633cc7359ecff3fecb23.tar.bz2
samba-c807911bf7f6906b3f89633cc7359ecff3fecb23.zip
s4:dsdb/common/util.c - fully remove "samdb_msg_add_string"
This isn't needed anymore and will be substituted by "ldb_msg_add_string". Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 7527f355b7..f87ed871c0 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -702,7 +702,7 @@ struct ldb_message_element *samdb_find_attribute(struct ldb_context *ldb,
int samdb_find_or_add_value(struct ldb_context *ldb, struct ldb_message *msg, const char *name, const char *set_value)
{
if (samdb_find_attribute(ldb, msg, name, set_value) == NULL) {
- return samdb_msg_add_string(ldb, msg, msg, name, set_value);
+ return ldb_msg_add_string(msg, name, set_value);
}
return LDB_SUCCESS;
}
@@ -716,22 +716,7 @@ int samdb_find_or_add_attribute(struct ldb_context *ldb, struct ldb_message *msg
return LDB_SUCCESS;
}
- return samdb_msg_add_string(ldb, msg, msg, name, set_value);
-}
-
-
-
-/*
- add a string element to a message
-*/
-int samdb_msg_add_string(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
- const char *attr_name, const char *str)
-{
- const char *s = talloc_strdup(mem_ctx, str);
- if (s == NULL) {
- return ldb_oom(sam_ldb);
- }
- return ldb_msg_add_string(msg, attr_name, s);
+ return ldb_msg_add_string(msg, name, set_value);
}
/*
@@ -1034,7 +1019,7 @@ int samdb_msg_set_string(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struc
if (el) {
el->num_values = 0;
}
- return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, str);
+ return ldb_msg_add_string(msg, attr_name, str);
}
/*