From b8040119285a50edf1596b4dce64a5f97e2f54e7 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 15 Feb 2018 12:21:57 +1100 Subject: ctdb-protocol: Drop marshalling code for RECEIVE_RECORDS control BUG: https://bugzilla.samba.org/show_bug.cgi?id=13641 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke (cherry picked from commit 2f89bd96fb6c5e50cfc09604ceb6b96a94cb4f56) --- ctdb/protocol/protocol_api.h | 6 ------ ctdb/protocol/protocol_client.c | 29 ----------------------------- ctdb/protocol/protocol_control.c | 26 -------------------------- 3 files changed, 61 deletions(-) (limited to 'ctdb') diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h index 8b40d1d8c0e..04a229c3ab4 100644 --- a/ctdb/protocol/protocol_api.h +++ b/ctdb/protocol/protocol_api.h @@ -530,12 +530,6 @@ int ctdb_reply_control_set_db_sticky(struct ctdb_reply_control *reply); void ctdb_req_control_reload_public_ips(struct ctdb_req_control *request); int ctdb_reply_control_reload_public_ips(struct ctdb_reply_control *reply); -void ctdb_req_control_receive_records(struct ctdb_req_control *request, - struct ctdb_rec_buffer *recbuf); -int ctdb_reply_control_receive_records(struct ctdb_reply_control *reply, - TALLOC_CTX *mem_ctx, - struct ctdb_rec_buffer **recbuf); - void ctdb_req_control_ipreallocated(struct ctdb_req_control *request); int ctdb_reply_control_ipreallocated(struct ctdb_reply_control *reply); diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c index a18af08e21a..9aa32a9bba7 100644 --- a/ctdb/protocol/protocol_client.c +++ b/ctdb/protocol/protocol_client.c @@ -1948,35 +1948,6 @@ int ctdb_reply_control_reload_public_ips(struct ctdb_reply_control *reply) /* CTDB_CONTROL_TRAVERSE_ALL_EXT */ -/* CTDB_CONTROL_RECEIVE_RECORDS */ - -void ctdb_req_control_receive_records(struct ctdb_req_control *request, - struct ctdb_rec_buffer *recbuf) -{ - request->opcode = CTDB_CONTROL_RECEIVE_RECORDS; - request->pad = 0; - request->srvid = 0; - request->client_id = 0; - request->flags = 0; - - request->rdata.opcode = CTDB_CONTROL_RECEIVE_RECORDS; - request->rdata.data.recbuf = recbuf; -} - -int ctdb_reply_control_receive_records(struct ctdb_reply_control *reply, - TALLOC_CTX *mem_ctx, - struct ctdb_rec_buffer **recbuf) -{ - if (reply->rdata.opcode != CTDB_CONTROL_RECEIVE_RECORDS) { - return EPROTO; - } - - if (reply->status == 0) { - *recbuf = talloc_steal(mem_ctx, reply->rdata.data.recbuf); - } - return reply->status; -} - /* CTDB_CONTROL_IPREALLOCATED */ void ctdb_req_control_ipreallocated(struct ctdb_req_control *request) diff --git a/ctdb/protocol/protocol_control.c b/ctdb/protocol/protocol_control.c index 12a78e1792d..0b88b5c8b5a 100644 --- a/ctdb/protocol/protocol_control.c +++ b/ctdb/protocol/protocol_control.c @@ -360,10 +360,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd) len = ctdb_traverse_all_ext_len(cd->data.traverse_all_ext); break; - case CTDB_CONTROL_RECEIVE_RECORDS: - len = ctdb_rec_buffer_len(cd->data.recbuf); - break; - case CTDB_CONTROL_IPREALLOCATED: break; @@ -660,10 +656,6 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd, &np); break; - case CTDB_CONTROL_RECEIVE_RECORDS: - ctdb_rec_buffer_push(cd->data.recbuf, buf, &np); - break; - case CTDB_CONTROL_DB_DETACH: ctdb_uint32_push(&cd->data.db_id, buf, &np); break; @@ -988,11 +980,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen, &np); break; - case CTDB_CONTROL_RECEIVE_RECORDS: - ret = ctdb_rec_buffer_pull(buf, buflen, mem_ctx, - &cd->data.recbuf, &np); - break; - case CTDB_CONTROL_DB_DETACH: ret = ctdb_uint32_pull(buf, buflen, &cd->data.db_id, &np); break; @@ -1368,10 +1355,6 @@ static size_t ctdb_reply_control_data_len(struct ctdb_reply_control_data *cd) case CTDB_CONTROL_TRAVERSE_ALL_EXT: break; - case CTDB_CONTROL_RECEIVE_RECORDS: - len = ctdb_rec_buffer_len(cd->data.recbuf); - break; - case CTDB_CONTROL_IPREALLOCATED: break; @@ -1562,10 +1545,6 @@ static void ctdb_reply_control_data_push(struct ctdb_reply_control_data *cd, ctdb_db_statistics_push(cd->data.dbstats, buf, &np); break; - case CTDB_CONTROL_RECEIVE_RECORDS: - ctdb_rec_buffer_push(cd->data.recbuf, buf, &np); - break; - case CTDB_CONTROL_GET_RUNSTATE: ctdb_uint32_push(&cd->data.runstate, buf, &np); break; @@ -1753,11 +1732,6 @@ static int ctdb_reply_control_data_pull(uint8_t *buf, size_t buflen, &cd->data.dbstats, &np); break; - case CTDB_CONTROL_RECEIVE_RECORDS: - ret = ctdb_rec_buffer_pull(buf, buflen, mem_ctx, - &cd->data.recbuf, &np); - break; - case CTDB_CONTROL_GET_RUNSTATE: ret = ctdb_uint32_pull(buf, buflen, &cd->data.runstate, &np); break; -- cgit v1.2.1