summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-10-05 19:05:32 +0200
committerMichael Adam <obnox@samba.org>2012-10-19 12:15:03 +0200
commita144911958d7bcd291a8f42a40832ffc0187279a (patch)
tree7e230c085a629c4b426bf4809db88114f0eb2d9a /source3/lib
parentd4f369c470ec1c8c7986a73e4ee6e18a97edd834 (diff)
downloadsamba-a144911958d7bcd291a8f42a40832ffc0187279a.tar.gz
samba-a144911958d7bcd291a8f42a40832ffc0187279a.tar.bz2
samba-a144911958d7bcd291a8f42a40832ffc0187279a.zip
s3:lib: remove unused connections_fetch_entry*() and connections_init()
metze Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/conn_tdb.c60
-rw-r--r--source3/lib/conn_tdb.h8
2 files changed, 0 insertions, 68 deletions
diff --git a/source3/lib/conn_tdb.c b/source3/lib/conn_tdb.c
index 3930e2736a..a7e7cf02eb 100644
--- a/source3/lib/conn_tdb.c
+++ b/source3/lib/conn_tdb.c
@@ -27,62 +27,6 @@
#include "lib/conn_tdb.h"
#include "util_tdb.h"
-static struct db_context *connections_db_ctx(bool rw)
-{
- static struct db_context *db_ctx;
- int open_flags;
-
- if (db_ctx != NULL) {
- return db_ctx;
- }
-
- open_flags = rw ? (O_RDWR|O_CREAT) : O_RDONLY;
-
- db_ctx = db_open(NULL, lock_path("connections.tdb"), 0,
- TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH|TDB_DEFAULT,
- open_flags, 0644, DBWRAP_LOCK_ORDER_1);
- return db_ctx;
-}
-
-static struct db_record *connections_fetch_record(TALLOC_CTX *mem_ctx,
- TDB_DATA key)
-{
- struct db_context *ctx = connections_db_ctx(True);
-
- if (ctx == NULL) {
- return NULL;
- }
-
- return dbwrap_fetch_locked(ctx, mem_ctx, key);
-}
-
-struct db_record *connections_fetch_entry_ext(TALLOC_CTX *mem_ctx,
- struct server_id id,
- int cnum,
- const char *name)
-{
- struct connections_key ckey;
- TDB_DATA key;
-
- ZERO_STRUCT(ckey);
- ckey.pid = id;
- ckey.cnum = cnum;
- strlcpy(ckey.name, name, sizeof(ckey.name));
-
- key.dsize = sizeof(ckey);
- key.dptr = (uint8 *)&ckey;
-
- return connections_fetch_record(mem_ctx, key);
-}
-
-struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx,
- connection_struct *conn,
- const char *name)
-{
- struct server_id id = messaging_server_id(conn->sconn->msg_ctx);
- return connections_fetch_entry_ext(mem_ctx, id, conn->cnum, name);
-}
-
struct connections_forall_state {
struct db_context *session_by_pid;
int (*fn)(const struct connections_key *key,
@@ -200,7 +144,3 @@ done:
return ret;
}
-bool connections_init(bool rw)
-{
- return (connections_db_ctx(rw) != NULL);
-}
diff --git a/source3/lib/conn_tdb.h b/source3/lib/conn_tdb.h
index 2f45281a81..b91a153740 100644
--- a/source3/lib/conn_tdb.h
+++ b/source3/lib/conn_tdb.h
@@ -37,15 +37,7 @@ struct connections_data {
/* The following definitions come from lib/conn_tdb.c */
-struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx,
- connection_struct *conn,
- const char *name);
-struct db_record *connections_fetch_entry_ext(TALLOC_CTX *mem_ctx,
- struct server_id id,
- int cnum,
- const char *name);
int connections_forall_read(int (*fn)(const struct connections_key *key,
const struct connections_data *data,
void *private_data),
void *private_data);
-bool connections_init(bool rw);