From e39cd86381404f451668967be05c7cfbb1649bbd Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 24 Aug 2011 13:15:48 +0200 Subject: s3:dbwrap: use dbwrap_fetch_bystring() in dbwrap_fetch_[u]int32() --- source3/lib/dbwrap/dbwrap_util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/lib/dbwrap/dbwrap_util.c b/source3/lib/dbwrap/dbwrap_util.c index a4f249270d..70df67a230 100644 --- a/source3/lib/dbwrap/dbwrap_util.c +++ b/source3/lib/dbwrap/dbwrap_util.c @@ -30,8 +30,10 @@ int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr) { TDB_DATA dbuf; int32 ret; + NTSTATUS status; - if (db->fetch(db, NULL, string_term_tdb_data(keystr), &dbuf) != 0) { + status = dbwrap_fetch_bystring(db, NULL, keystr, &dbuf); + if (!NT_STATUS_IS_OK(status)) { return -1; } @@ -69,8 +71,10 @@ bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr, uint32_t *val) { TDB_DATA dbuf; + NTSTATUS status; - if (db->fetch(db, NULL, string_term_tdb_data(keystr), &dbuf) != 0) { + status = dbwrap_fetch_bystring(db, NULL, keystr, &dbuf); + if (!NT_STATUS_IS_OK(status)) { return false; } -- cgit