summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-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),