From: Martin Schwenke Date: Thu, 6 Aug 2020 07:30:18 +0000 (+1000) Subject: ctdb-protocol: Drop client functions for old-style database pull/push X-Git-Tag: talloc-2.3.2~549 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3bbb4a85357ce9dcf62f0efab7c6b3cdbd21f6c7;p=thirdparty%2Fsamba.git ctdb-protocol: Drop client functions for old-style database pull/push Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h index bdb4bc0e2ea..7bbe33b22fe 100644 --- a/ctdb/protocol/protocol_api.h +++ b/ctdb/protocol/protocol_api.h @@ -221,16 +221,6 @@ int ctdb_reply_control_get_dbmap(struct ctdb_reply_control *reply, TALLOC_CTX *mem_ctx, struct ctdb_dbid_map **dbmap); -void ctdb_req_control_pull_db(struct ctdb_req_control *request, - struct ctdb_pulldb *pulldb); -int ctdb_reply_control_pull_db(struct ctdb_reply_control *reply, - TALLOC_CTX *mem_ctx, - struct ctdb_rec_buffer **recbuf); - -void ctdb_req_control_push_db(struct ctdb_req_control *request, - struct ctdb_rec_buffer *recbuf); -int ctdb_reply_control_push_db(struct ctdb_reply_control *reply); - void ctdb_req_control_get_recmode(struct ctdb_req_control *request); int ctdb_reply_control_get_recmode(struct ctdb_reply_control *reply, int *recmode); diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c index cde544feb52..6d850be86df 100644 --- a/ctdb/protocol/protocol_client.c +++ b/ctdb/protocol/protocol_client.c @@ -281,55 +281,6 @@ int ctdb_reply_control_get_dbmap(struct ctdb_reply_control *reply, return reply->status; } -/* CTDB_CONTROL_PULL_DB */ - -void ctdb_req_control_pull_db(struct ctdb_req_control *request, - struct ctdb_pulldb *pulldb) -{ - request->opcode = CTDB_CONTROL_PULL_DB; - request->pad = 0; - request->srvid = 0; - request->client_id = 0; - request->flags = 0; - - request->rdata.opcode = CTDB_CONTROL_PULL_DB; - request->rdata.data.pulldb = pulldb; -} - -int ctdb_reply_control_pull_db(struct ctdb_reply_control *reply, - TALLOC_CTX *mem_ctx, - struct ctdb_rec_buffer **recbuf) -{ - if (reply->rdata.opcode != CTDB_CONTROL_PULL_DB) { - return EPROTO; - } - - if (reply->status == 0) { - *recbuf = talloc_steal(mem_ctx, reply->rdata.data.recbuf); - } - return reply->status; -} - -/* CTDB_CONTROL_PUSH_DB */ - -void ctdb_req_control_push_db(struct ctdb_req_control *request, - struct ctdb_rec_buffer *recbuf) -{ - request->opcode = CTDB_CONTROL_PUSH_DB; - request->pad = 0; - request->srvid = 0; - request->client_id = 0; - request->flags = 0; - - request->rdata.opcode = CTDB_CONTROL_PUSH_DB; - request->rdata.data.recbuf = recbuf; -} - -int ctdb_reply_control_push_db(struct ctdb_reply_control *reply) -{ - return ctdb_reply_control_generic(reply, CTDB_CONTROL_PUSH_DB); -} - /* CTDB_CONTROL_GET_RECMODE */ void ctdb_req_control_get_recmode(struct ctdb_req_control *request)