ctdb-protocol: Drop marshalling code for RECEIVE_RECORDS control
authorAmitay Isaacs <amitay@gmail.com>
Thu, 15 Feb 2018 01:21:57 +0000 (12:21 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 8 Oct 2018 00:46:21 +0000 (02:46 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13641

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/protocol/protocol_api.h
ctdb/protocol/protocol_client.c
ctdb/protocol/protocol_control.c

index 1cd5d7d66e66626cf0c3a24b2771a6ad43aba30a..6104c10e7b5a269ff914cd894d3897e47ae68f72 100644 (file)
@@ -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);
 
index a18af08e21a5bf74c8fe42066e051ebf980f2541..9aa32a9bba7c409f421dfc9c39b0bf89cba4954a 100644 (file)
@@ -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)
index 12a78e1792d10dcf01f460c21b9ba52c1c429c23..0b88b5c8b5a5016fe5bc0585e67a53c63d0a70ae 100644 (file)
@@ -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;