summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-05-17 16:40:45 +0200
committerVolker Lendecke <vl@samba.org>2017-06-15 13:19:13 +0200
commit6358901f152e72cad5e7718e01e79551fa6195a6 (patch)
treec663f51734eb0a8cbd654c2c7e4318e5abf9e102
parent49a80e5a0c1b6ec4ff5529587e068121e045dbc7 (diff)
downloadsamba-6358901f152e72cad5e7718e01e79551fa6195a6.tar.gz
g_lock: Remove unused g_lock_get
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/include/g_lock.h2
-rw-r--r--source3/lib/g_lock.c33
2 files changed, 0 insertions, 35 deletions
diff --git a/source3/include/g_lock.h b/source3/include/g_lock.h
index f513349bfc2..998a9da8544 100644
--- a/source3/include/g_lock.h
+++ b/source3/include/g_lock.h
@@ -42,8 +42,6 @@ NTSTATUS g_lock_lock_recv(struct tevent_req *req);
NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name,
enum g_lock_type lock_type, struct timeval timeout);
NTSTATUS g_lock_unlock(struct g_lock_ctx *ctx, const char *name);
-NTSTATUS g_lock_get(struct g_lock_ctx *ctx, const char *name,
- struct server_id *pid);
NTSTATUS g_lock_do(const char *name, enum g_lock_type lock_type,
struct timeval timeout,
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index f9eb5ef7e9f..d0302cde443 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -558,39 +558,6 @@ NTSTATUS g_lock_dump(struct g_lock_ctx *ctx, const char *name,
return NT_STATUS_OK;
}
-struct g_lock_get_state {
- bool found;
- struct server_id *pid;
-};
-
-static int g_lock_get_fn(struct server_id pid, enum g_lock_type lock_type,
- void *priv)
-{
- struct g_lock_get_state *state = (struct g_lock_get_state *)priv;
- state->found = true;
- *state->pid = pid;
- return 1;
-}
-
-NTSTATUS g_lock_get(struct g_lock_ctx *ctx, const char *name,
- struct server_id *pid)
-{
- struct g_lock_get_state state;
- NTSTATUS status;
-
- state.found = false;
- state.pid = pid;
-
- status = g_lock_dump(ctx, name, g_lock_get_fn, &state);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
- if (!state.found) {
- return NT_STATUS_NOT_FOUND;
- }
- return NT_STATUS_OK;
-}
-
static bool g_lock_init_all(TALLOC_CTX *mem_ctx,
struct tevent_context **pev,
struct messaging_context **pmsg,