mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
ctdb-protocol: Drop marshalling code for RECEIVE_RECORDS control
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>
This commit is contained in:
parent
81dae71fa7
commit
2f89bd96fb
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user