summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-08-17 11:42:45 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:56 +0200
commit64748e8eecf520d7e32bb37c8743f870bf4a0fc5 (patch)
tree13cae623983ecb32a38bce0867c7da8ad5793f47
parentf21a66f70bb771a61a353c7e01e89f5873573995 (diff)
downloadsamba-64748e8eecf520d7e32bb37c8743f870bf4a0fc5.tar.gz
samba-64748e8eecf520d7e32bb37c8743f870bf4a0fc5.tar.bz2
samba-64748e8eecf520d7e32bb37c8743f870bf4a0fc5.zip
s3:dbwrap_tool: convert to using wrapper functions only
-rw-r--r--source3/utils/dbwrap_tool.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 7aeaa394eb..d6aea126b8 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -116,7 +116,7 @@ static int dbwrap_tool_delete(struct db_context *db,
static int delete_fn(struct db_record *rec, void *priv)
{
- rec->delete_rec(rec);
+ dbwrap_record_delete(rec);
return 0;
}
@@ -128,11 +128,11 @@ static int dbwrap_tool_erase(struct db_context *db,
const char *keyname,
void *data)
{
- int ret;
+ NTSTATUS status;
- ret = db->traverse(db, delete_fn, NULL);
+ status = dbwrap_traverse(db, delete_fn, NULL, NULL);
- if (ret < 0) {
+ if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "ERROR erasing the database\n");
return -1;
}
@@ -142,8 +142,8 @@ static int dbwrap_tool_erase(struct db_context *db,
static int listkey_fn(struct db_record *rec, void *private_data)
{
- int length = rec->key.dsize;
- unsigned char *p = (unsigned char *)rec->key.dptr;
+ int length = dbwrap_record_get_key(rec).dsize;
+ unsigned char *p = (unsigned char *)dbwrap_record_get_key(rec).dptr;
while (length--) {
if (isprint(*p) && !strchr("\"\\", *p)) {
@@ -163,11 +163,11 @@ static int dbwrap_tool_listkeys(struct db_context *db,
const char *keyname,
void *data)
{
- int ret;
+ NTSTATUS status;
- ret = db->traverse_read(db, listkey_fn, NULL);
+ status = dbwrap_traverse_read(db, listkey_fn, NULL, NULL);
- if (ret < 0) {
+ if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "ERROR listing db keys\n");
return -1;
}