svn commit: samba r16125 - in branches/SAMBA_4_0/source/dsdb/samdb: .

abartlet at samba.org abartlet at samba.org
Fri Jun 9 16:33:46 GMT 2006


Author: abartlet
Date: 2006-06-09 16:33:46 +0000 (Fri, 09 Jun 2006)
New Revision: 16125

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16125

Log:
Add another helpful utility function: samdb_msg_add_int()

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/samdb.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/samdb.c	2006-06-09 14:59:04 UTC (rev 16124)
+++ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c	2006-06-09 16:33:46 UTC (rev 16125)
@@ -761,6 +761,16 @@
 }
 
 /*
+  add a int element to a message
+*/
+int samdb_msg_add_int(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
+		       const char *attr_name, int v)
+{
+	const char *s = talloc_asprintf(mem_ctx, "%d", v);
+	return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s);
+}
+
+/*
   add a uint_t element to a message
 */
 int samdb_msg_add_uint(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,



More information about the samba-cvs mailing list