diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-03-28 20:03:30 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-04-01 14:04:23 +0200 |
commit | 3f076ab77384500d6d08ee8b977338ee88911dfe (patch) | |
tree | 9e63b101815d87ae341bad4e1c50f7d2b71d0a33 /source3 | |
parent | 92e6d07ad9743a9e4c10765095b1bdadab2f0541 (diff) | |
download | samba-3f076ab77384500d6d08ee8b977338ee88911dfe.tar.gz samba-3f076ab77384500d6d08ee8b977338ee88911dfe.tar.bz2 samba-3f076ab77384500d6d08ee8b977338ee88911dfe.zip |
dbwrap: add dbwrap_trans_store_uint32()
metze
(This used to be commit 9e739b4c99a9aba5c5bb58f3b6a9fb949e24c581)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/dbwrap_util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c index cecb8d6dd6..1105b083e0 100644 --- a/source3/lib/dbwrap_util.c +++ b/source3/lib/dbwrap_util.c @@ -256,6 +256,19 @@ NTSTATUS dbwrap_trans_store_int32(struct db_context *db, const char *keystr, TDB_REPLACE); } +NTSTATUS dbwrap_trans_store_uint32(struct db_context *db, const char *keystr, + uint32_t v) +{ + uint32 v_store; + + SIVAL(&v_store, 0, v); + + return dbwrap_trans_store(db, string_term_tdb_data(keystr), + make_tdb_data((const uint8 *)&v_store, + sizeof(v_store)), + TDB_REPLACE); +} + NTSTATUS dbwrap_trans_store_bystring(struct db_context *db, const char *key, TDB_DATA data, int flags) { |