summaryrefslogtreecommitdiffstats
path: root/source3/lib/messages.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-28 11:38:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:52 -0500
commit054bf2fc8bd8ac62e16ec04001c0a4a8409d0e1d (patch)
tree7d548dccf6d872e3b780c9f7b7b88d8046789f2a /source3/lib/messages.c
parent7e27c984c4033d4f3cbeec9c18627ef9d8aa5f90 (diff)
downloadsamba-054bf2fc8bd8ac62e16ec04001c0a4a8409d0e1d.tar.gz
samba-054bf2fc8bd8ac62e16ec04001c0a4a8409d0e1d.tar.xz
samba-054bf2fc8bd8ac62e16ec04001c0a4a8409d0e1d.zip
r23171: Convert connections.tdb to dbwrap
(This used to be commit 80a1f43825063bbbda896175d99700ede5a4757a)
Diffstat (limited to 'source3/lib/messages.c')
-rw-r--r--source3/lib/messages.c22
1 files changed, 8 insertions, 14 deletions
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;