From 054bf2fc8bd8ac62e16ec04001c0a4a8409d0e1d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 28 May 2007 11:38:42 +0000 Subject: r23171: Convert connections.tdb to dbwrap (This used to be commit 80a1f43825063bbbda896175d99700ede5a4757a) --- source3/lib/messages.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'source3/lib/messages.c') diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 056286f89a..01683bf9ec 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -96,12 +96,12 @@ struct msg_all { Send one of the messages for the broadcast. ****************************************************************************/ -static int traverse_fn(TDB_CONTEXT *the_tdb, +static int traverse_fn(struct db_record *rec, const struct connections_key *ckey, const struct connections_data *crec, - void *private_data) + void *state) { - struct msg_all *msg_all = (struct msg_all *)private_data; + struct msg_all *msg_all = (struct msg_all *)state; NTSTATUS status; if (crec->cnum != -1) @@ -120,20 +120,14 @@ static int traverse_fn(TDB_CONTEXT *the_tdb, (uint8 *)msg_all->buf, msg_all->len); if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_HANDLE)) { - - TDB_DATA key; - /* If the pid was not found delete the entry from - * connections.tdb */ - - DEBUG(2,("pid %s doesn't exist - deleting connections " - "%d [%s]\n", procid_str_static(&crec->pid), - crec->cnum, crec->servicename)); + /* If the pid was not found delete the entry from connections.tdb */ - key.dptr = (uint8 *)ckey; - key.dsize = sizeof(*ckey); + DEBUG(2,("pid %s doesn't exist - deleting connections %d [%s]\n", + procid_str_static(&crec->pid), crec->cnum, + crec->servicename)); - tdb_delete(the_tdb, key); + rec->delete_rec(rec); } msg_all->n_sent++; return 0; -- cgit