summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2012-08-27 15:21:42 +0200
committerMichael Adam <obnox@samba.org>2012-10-19 12:15:02 +0200
commitb74ed25a9999c0029ddf2771f729c497c20b9c30 (patch)
tree9d678e7320b4d6c39540cd4d9ac154b799fcf781 /source3
parent3b61c605d6815a8033d70f367a69e876f63bc5de (diff)
downloadsamba-b74ed25a9999c0029ddf2771f729c497c20b9c30.tar.gz
samba-b74ed25a9999c0029ddf2771f729c497c20b9c30.tar.bz2
samba-b74ed25a9999c0029ddf2771f729c497c20b9c30.zip
s3:lib: remove function connections_forall()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/conn_tdb.c56
-rw-r--r--source3/lib/conn_tdb.h5
2 files changed, 0 insertions, 61 deletions
diff --git a/source3/lib/conn_tdb.c b/source3/lib/conn_tdb.c
index c4690055bc..0a622de1c6 100644
--- a/source3/lib/conn_tdb.c
+++ b/source3/lib/conn_tdb.c
@@ -81,62 +81,6 @@ struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx,
return connections_fetch_entry_ext(mem_ctx, id, conn->cnum, name);
}
-
-struct conn_traverse_state {
- int (*fn)(struct db_record *rec,
- const struct connections_key *key,
- const struct connections_data *data,
- void *private_data);
- void *private_data;
-};
-
-static int conn_traverse_fn(struct db_record *rec, void *private_data)
-{
- TDB_DATA key;
- TDB_DATA value;
- struct conn_traverse_state *state =
- (struct conn_traverse_state *)private_data;
-
- key = dbwrap_record_get_key(rec);
- value = dbwrap_record_get_value(rec);
-
- if ((key.dsize != sizeof(struct connections_key))
- || (value.dsize != sizeof(struct connections_data))) {
- return 0;
- }
-
- return state->fn(rec, (const struct connections_key *)key.dptr,
- (const struct connections_data *)value.dptr,
- state->private_data);
-}
-
-int connections_forall(int (*fn)(struct db_record *rec,
- const struct connections_key *key,
- const struct connections_data *data,
- void *private_data),
- void *private_data)
-{
- struct db_context *ctx;
- struct conn_traverse_state state;
- NTSTATUS status;
- int count;
-
- ctx = connections_db_ctx(true);
- if (ctx == NULL) {
- return -1;
- }
-
- state.fn = fn;
- state.private_data = private_data;
-
- status = dbwrap_traverse(ctx, conn_traverse_fn, (void *)&state, &count);
- if (!NT_STATUS_IS_OK(status)) {
- return -1;
- }
-
- return count;
-}
-
struct conn_traverse_read_state {
int (*fn)(const struct connections_key *key,
const struct connections_data *data,
diff --git a/source3/lib/conn_tdb.h b/source3/lib/conn_tdb.h
index bf8add9931..180a5e23fd 100644
--- a/source3/lib/conn_tdb.h
+++ b/source3/lib/conn_tdb.h
@@ -51,11 +51,6 @@ struct db_record *connections_fetch_entry_ext(TALLOC_CTX *mem_ctx,
struct server_id id,
int cnum,
const char *name);
-int connections_forall(int (*fn)(struct db_record *rec,
- const struct connections_key *key,
- const struct connections_data *data,
- void *private_data),
- void *private_data);
int connections_forall_read(int (*fn)(const struct connections_key *key,
const struct connections_data *data,
void *private_data),