summaryrefslogtreecommitdiffstats
path: root/source3/lib/ctdbd_conn.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-11-24 14:15:38 +0000
committerStefan Metzmacher <metze@samba.org>2013-03-26 11:19:29 +0100
commitd147194466560488cda9f6e5e993c985cea02289 (patch)
tree8299588f8f3ab920eb5f9ac202e1d532f0950bce /source3/lib/ctdbd_conn.c
parent1409895d9e271744060d3f1ef2c71da5b5151f6a (diff)
downloadsamba-d147194466560488cda9f6e5e993c985cea02289.tar.gz
samba-d147194466560488cda9f6e5e993c985cea02289.tar.xz
samba-d147194466560488cda9f6e5e993c985cea02289.zip
ctdb-conn: remove ctdbd_fetch
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/lib/ctdbd_conn.c')
-rw-r--r--source3/lib/ctdbd_conn.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index d77b03dc0a..1481a9c185 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -1414,87 +1414,6 @@ NTSTATUS ctdbd_migrate(struct ctdbd_connection *conn, uint32_t db_id,
}
/*
- * remotely fetch a record (read-only)
- */
-NTSTATUS ctdbd_fetch(struct ctdbd_connection *conn, uint32_t db_id,
- TDB_DATA key, TALLOC_CTX *mem_ctx, TDB_DATA *data,
- bool local_copy)
-{
- struct ctdb_req_call req;
- struct ctdb_reply_call *reply;
- NTSTATUS status;
- uint32_t flags;
-
-#ifdef HAVE_CTDB_WANT_READONLY_DECL
- flags = local_copy ? CTDB_WANT_READONLY : 0;
-#else
- flags = 0;
-#endif
-
- ZERO_STRUCT(req);
-
- req.hdr.length = offsetof(struct ctdb_req_call, data) + key.dsize;
- req.hdr.ctdb_magic = CTDB_MAGIC;
- req.hdr.ctdb_version = CTDB_VERSION;
- req.hdr.operation = CTDB_REQ_CALL;
- req.hdr.reqid = ctdbd_next_reqid(conn);
- req.flags = flags;
- req.callid = CTDB_FETCH_FUNC;
- req.db_id = db_id;
- req.keylen = key.dsize;
-
- status = ctdb_packet_send(
- conn->pkt, 2,
- data_blob_const(&req, offsetof(struct ctdb_req_call, data)),
- data_blob_const(key.dptr, key.dsize));
-
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(3, ("ctdb_packet_send failed: %s\n", nt_errstr(status)));
- return status;
- }
-
- status = ctdb_packet_flush(conn->pkt);
-
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(3, ("write to ctdbd failed: %s\n", nt_errstr(status)));
- cluster_fatal("cluster dispatch daemon control write error\n");
- }
-
- status = ctdb_read_req(conn, req.hdr.reqid, NULL, (void *)&reply);
-
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("ctdb_read_req failed: %s\n", nt_errstr(status)));
- goto fail;
- }
-
- if (reply->hdr.operation != CTDB_REPLY_CALL) {
- DEBUG(0, ("received invalid reply\n"));
- status = NT_STATUS_INTERNAL_ERROR;
- goto fail;
- }
-
- data->dsize = reply->datalen;
- if (data->dsize == 0) {
- data->dptr = NULL;
- goto done;
- }
-
- data->dptr = (uint8 *)talloc_memdup(mem_ctx, &reply->data[0],
- reply->datalen);
- if (data->dptr == NULL) {
- DEBUG(0, ("talloc failed\n"));
- status = NT_STATUS_NO_MEMORY;
- goto fail;
- }
-
- done:
- status = NT_STATUS_OK;
- fail:
- TALLOC_FREE(reply);
- return status;
-}
-
-/*
* Fetch a record and parse it
*/
NTSTATUS ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id,