From: Martin Schwenke Date: Tue, 5 Apr 2016 06:12:00 +0000 (+1000) Subject: ctdb-protocol: Drop support for SET_RECLOCK X-Git-Tag: tdb-1.3.10~933 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=872eb37eb401c67d3a5875ec4e323498466fd056;p=thirdparty%2Fsamba.git ctdb-protocol: Drop support for SET_RECLOCK Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h index 7f2ba92bbc1..1b84d546046 100644 --- a/ctdb/protocol/protocol.h +++ b/ctdb/protocol/protocol.h @@ -867,7 +867,6 @@ struct ctdb_req_control_data { struct ctdb_public_ip *pubip; enum ctdb_event event; double reclock_latency; - const char *reclock_file; uint32_t role; const char *script; struct ctdb_ban_state *ban_state; diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h index 17ed8c35304..055de444f15 100644 --- a/ctdb/protocol/protocol_api.h +++ b/ctdb/protocol/protocol_api.h @@ -457,10 +457,6 @@ int ctdb_reply_control_get_reclock_file(struct ctdb_reply_control *reply, TALLOC_CTX *mem_ctx, const char **reclock_file); -void ctdb_req_control_set_reclock_file(struct ctdb_req_control *request, - const char *reclock_file); -int ctdb_reply_control_set_reclock_file(struct ctdb_reply_control *reply); - void ctdb_req_control_stop_node(struct ctdb_req_control *request); int ctdb_reply_control_stop_node(struct ctdb_reply_control *reply); diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c index 73553788cea..e148b772b02 100644 --- a/ctdb/protocol/protocol_client.c +++ b/ctdb/protocol/protocol_client.c @@ -1591,28 +1591,6 @@ int ctdb_reply_control_get_reclock_file(struct ctdb_reply_control *reply, return reply->status; } -/* CTDB_CONTROL_SET_RECLOCK_FILE */ - -void ctdb_req_control_set_reclock_file(struct ctdb_req_control *request, - const char *reclock_file) -{ - request->opcode = CTDB_CONTROL_SET_RECLOCK_FILE; - request->pad = 0; - request->srvid = 0; - request->client_id = 0; - request->flags = 0; - - request->rdata.opcode = CTDB_CONTROL_SET_RECLOCK_FILE; - request->rdata.data.reclock_file = reclock_file; -} - -int ctdb_reply_control_set_reclock_file(struct ctdb_reply_control *reply) -{ - return ctdb_reply_control_generic(reply, - CTDB_CONTROL_SET_RECLOCK_FILE); -} - - /* CTDB_CONTROL_STOP_NODE */ void ctdb_req_control_stop_node(struct ctdb_req_control *request) diff --git a/ctdb/protocol/protocol_control.c b/ctdb/protocol/protocol_control.c index fc2e6da0277..f1c03ae3fd2 100644 --- a/ctdb/protocol/protocol_control.c +++ b/ctdb/protocol/protocol_control.c @@ -304,10 +304,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd) case CTDB_CONTROL_GET_RECLOCK_FILE: break; - case CTDB_CONTROL_SET_RECLOCK_FILE: - len = ctdb_string_len(cd->data.reclock_file); - break; - case CTDB_CONTROL_STOP_NODE: break; @@ -636,10 +632,6 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd, ctdb_double_push(cd->data.reclock_latency, buf); break; - case CTDB_CONTROL_SET_RECLOCK_FILE: - ctdb_string_push(cd->data.reclock_file, buf); - break; - case CTDB_CONTROL_SET_LMASTERROLE: ctdb_uint32_push(cd->data.role, buf); break; @@ -979,11 +971,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen, &cd->data.reclock_latency); break; - case CTDB_CONTROL_SET_RECLOCK_FILE: - ret = ctdb_string_pull(buf, buflen, mem_ctx, - &cd->data.reclock_file); - break; - case CTDB_CONTROL_SET_LMASTERROLE: ret = ctdb_uint32_pull(buf, buflen, mem_ctx, &cd->data.role); @@ -1393,9 +1380,6 @@ static size_t ctdb_reply_control_data_len(struct ctdb_reply_control_data *cd) len = ctdb_string_len(cd->data.reclock_file); break; - case CTDB_CONTROL_SET_RECLOCK_FILE: - break; - case CTDB_CONTROL_STOP_NODE: break; diff --git a/ctdb/protocol/protocol_debug.c b/ctdb/protocol/protocol_debug.c index b86f1c29dd8..76d796e8adb 100644 --- a/ctdb/protocol/protocol_debug.c +++ b/ctdb/protocol/protocol_debug.c @@ -190,7 +190,6 @@ static void ctdb_opcode_print(uint32_t opcode, FILE *fp) { CTDB_CONTROL_TRAVERSE_KILL, "TRAVERSE_KILL" }, { CTDB_CONTROL_RECD_RECLOCK_LATENCY, "RECD_RECLOCK_LATENCY" }, { CTDB_CONTROL_GET_RECLOCK_FILE, "GET_RECLOCK_FILE" }, - { CTDB_CONTROL_SET_RECLOCK_FILE, "SET_RECLOCK_FILE" }, { CTDB_CONTROL_STOP_NODE, "STOP_NODE" }, { CTDB_CONTROL_CONTINUE_NODE, "CONTINUE_NODE" }, { CTDB_CONTROL_SET_NATGWSTATE, "SET_NATGWSTATE" }, diff --git a/ctdb/tests/src/protocol_client_test.c b/ctdb/tests/src/protocol_client_test.c index 16ec8452ea2..7ef2e1949f6 100644 --- a/ctdb/tests/src/protocol_client_test.c +++ b/ctdb/tests/src/protocol_client_test.c @@ -439,11 +439,6 @@ static void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx, case CTDB_CONTROL_GET_RECLOCK_FILE: break; - case CTDB_CONTROL_SET_RECLOCK_FILE: - fill_ctdb_string(mem_ctx, &cd->data.reclock_file); - assert(cd->data.reclock_file != NULL); - break; - case CTDB_CONTROL_STOP_NODE: break; @@ -909,11 +904,6 @@ static void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd, case CTDB_CONTROL_GET_RECLOCK_FILE: break; - case CTDB_CONTROL_SET_RECLOCK_FILE: - verify_ctdb_string(cd->data.reclock_file, - cd2->data.reclock_file); - break; - case CTDB_CONTROL_STOP_NODE: break; @@ -1380,9 +1370,6 @@ static void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx, assert(cd->data.reclock_file != NULL); break; - case CTDB_CONTROL_SET_RECLOCK_FILE: - break; - case CTDB_CONTROL_STOP_NODE: break; @@ -1767,9 +1754,6 @@ static void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd, cd2->data.reclock_file); break; - case CTDB_CONTROL_SET_RECLOCK_FILE: - break; - case CTDB_CONTROL_STOP_NODE: break;