mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
ctdb-protocol: Drop marshalling code for CHECK_SRVIDS control
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
4041cd7594
commit
66694d8926
@ -517,12 +517,6 @@ void ctdb_req_control_set_db_readonly(struct ctdb_req_control *request,
|
||||
uint32_t db_id);
|
||||
int ctdb_reply_control_set_db_readonly(struct ctdb_reply_control *reply);
|
||||
|
||||
void ctdb_req_control_check_srvids(struct ctdb_req_control *request,
|
||||
struct ctdb_uint64_array *u64_array);
|
||||
int ctdb_reply_control_check_srvids(struct ctdb_reply_control *reply,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct ctdb_uint8_array **u8_array);
|
||||
|
||||
void ctdb_req_control_traverse_start_ext(struct ctdb_req_control *request,
|
||||
struct ctdb_traverse_start_ext *traverse);
|
||||
int ctdb_reply_control_traverse_start_ext(struct ctdb_reply_control *reply);
|
||||
|
@ -1915,33 +1915,6 @@ int ctdb_reply_control_set_db_readonly(struct ctdb_reply_control *reply)
|
||||
|
||||
/* CTDB_CONTROL_CHECK_SRVIDS */
|
||||
|
||||
void ctdb_req_control_check_srvids(struct ctdb_req_control *request,
|
||||
struct ctdb_uint64_array *u64_array)
|
||||
{
|
||||
request->opcode = CTDB_CONTROL_CHECK_SRVIDS;
|
||||
request->pad = 0;
|
||||
request->srvid = 0;
|
||||
request->client_id = 0;
|
||||
request->flags = 0;
|
||||
|
||||
request->rdata.opcode = CTDB_CONTROL_CHECK_SRVIDS;
|
||||
request->rdata.data.u64_array = u64_array;
|
||||
}
|
||||
|
||||
int ctdb_reply_control_check_srvids(struct ctdb_reply_control *reply,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct ctdb_uint8_array **u8_array)
|
||||
{
|
||||
if (reply->rdata.opcode != CTDB_CONTROL_CHECK_SRVIDS) {
|
||||
return EPROTO;
|
||||
}
|
||||
|
||||
if (reply->status == 0) {
|
||||
*u8_array = talloc_steal(mem_ctx, reply->rdata.data.u8_array);
|
||||
}
|
||||
return reply->status;
|
||||
}
|
||||
|
||||
/* CTDB_CONTROL_TRAVERSE_START_EXT */
|
||||
|
||||
void ctdb_req_control_traverse_start_ext(struct ctdb_req_control *request,
|
||||
|
@ -356,7 +356,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
len = ctdb_uint64_array_len(cd->data.u64_array);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_TRAVERSE_START_EXT:
|
||||
@ -639,7 +638,6 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd,
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
ctdb_uint64_array_push(cd->data.u64_array, buf);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_TRAVERSE_START_EXT:
|
||||
@ -962,8 +960,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen,
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
ret = ctdb_uint64_array_pull(buf, buflen, mem_ctx,
|
||||
&cd->data.u64_array);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_TRAVERSE_START_EXT:
|
||||
@ -1344,7 +1340,6 @@ static size_t ctdb_reply_control_data_len(struct ctdb_reply_control_data *cd)
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
len = ctdb_uint8_array_len(cd->data.u8_array);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_TRAVERSE_START_EXT:
|
||||
@ -1540,7 +1535,6 @@ static void ctdb_reply_control_data_push(struct ctdb_reply_control_data *cd,
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
ctdb_uint8_array_push(cd->data.u8_array, buf);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_GET_DB_STATISTICS:
|
||||
@ -1728,8 +1722,6 @@ static int ctdb_reply_control_data_pull(uint8_t *buf, size_t buflen,
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
ret = ctdb_uint8_array_pull(buf, buflen, mem_ctx,
|
||||
&cd->data.u8_array);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_GET_DB_STATISTICS:
|
||||
|
@ -505,9 +505,6 @@ static void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
cd->data.u64_array = talloc(mem_ctx, struct ctdb_uint64_array);
|
||||
assert(cd->data.u64_array != NULL);
|
||||
fill_ctdb_uint64_array(mem_ctx, cd->data.u64_array);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_TRAVERSE_START_EXT:
|
||||
@ -920,8 +917,6 @@ static void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd,
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
verify_ctdb_uint64_array(cd->data.u64_array,
|
||||
cd2->data.u64_array);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_TRAVERSE_START_EXT:
|
||||
@ -1359,9 +1354,6 @@ static void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx,
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
cd->data.u8_array = talloc(mem_ctx, struct ctdb_uint8_array);
|
||||
assert(cd->data.u8_array != NULL);
|
||||
fill_ctdb_uint8_array(mem_ctx, cd->data.u8_array);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_TRAVERSE_START_EXT:
|
||||
@ -1713,7 +1705,6 @@ static void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd,
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_CHECK_SRVIDS:
|
||||
verify_ctdb_uint8_array(cd->data.u8_array, cd2->data.u8_array);
|
||||
break;
|
||||
|
||||
case CTDB_CONTROL_TRAVERSE_START_EXT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user