diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-01-30 10:07:17 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-01-30 10:07:17 +1030 |
commit | 641beb35bff243bab5651a1cab8aa4b305ecefa4 (patch) | |
tree | 2b93e94470242bb986f5e3f384e731dc55a2e21d /source4 | |
parent | dd1d57370d6d83473a7ada3ceb8d250d357ff429 (diff) | |
download | samba-641beb35bff243bab5651a1cab8aa4b305ecefa4.tar.gz samba-641beb35bff243bab5651a1cab8aa4b305ecefa4.tar.bz2 samba-641beb35bff243bab5651a1cab8aa4b305ecefa4.zip |
samdb: use compat wrappers for tdb_fetch().
TDB2's tdb_fetch() returns an error code; use tdb_fetch_compat() for now.
Similarly, tdb_errorstr() -> tdb_errorstr_compat().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/partition_metadata.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/partition_metadata.c b/source4/dsdb/samdb/ldb_modules/partition_metadata.c index 05f87d053c..acf414b1c2 100644 --- a/source4/dsdb/samdb/ldb_modules/partition_metadata.c +++ b/source4/dsdb/samdb/ldb_modules/partition_metadata.c @@ -54,14 +54,14 @@ static int partition_metadata_get_uint64(struct ldb_module *module, tdb_key.dptr = (uint8_t *)discard_const_p(char, key); tdb_key.dsize = strlen(key); - tdb_data = tdb_fetch(tdb, tdb_key); + tdb_data = tdb_fetch_compat(tdb, tdb_key); if (!tdb_data.dptr) { if (tdb_error(tdb) == TDB_ERR_NOEXIST) { *value = default_value; return LDB_SUCCESS; } else { return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR, - tdb_errorstr(tdb)); + tdb_errorstr_compat(tdb)); } } @@ -131,7 +131,7 @@ static int partition_metadata_set_uint64(struct ldb_module *module, if (tdb_store(tdb, tdb_key, tdb_data, tdb_flag) != 0) { talloc_free(tmp_ctx); return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR, - tdb_errorstr(tdb)); + tdb_errorstr_compat(tdb)); } talloc_free(tmp_ctx); @@ -392,7 +392,7 @@ int partition_metadata_start_trans(struct ldb_module *module) if (tdb_transaction_start(tdb) != 0) { return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR, - tdb_errorstr(tdb)); + tdb_errorstr_compat(tdb)); } data->metadata->in_transaction++; @@ -424,7 +424,7 @@ int partition_metadata_prepare_commit(struct ldb_module *module) if (tdb_transaction_prepare_commit(tdb) != 0) { return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR, - tdb_errorstr(tdb)); + tdb_errorstr_compat(tdb)); } return LDB_SUCCESS; @@ -456,7 +456,7 @@ int partition_metadata_end_trans(struct ldb_module *module) if (tdb_transaction_commit(tdb) != 0) { return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR, - tdb_errorstr(tdb)); + tdb_errorstr_compat(tdb)); } return LDB_SUCCESS; |