From a808c0200197a4648caba88a550c8d63f3c8fe63 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 4 Sep 2017 14:54:47 +1000 Subject: ctdb-protocol: Drop marshalling for monitor controls Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Sep 14 18:42:28 CEST 2017 on sn-devel-144 --- ctdb/protocol/protocol_api.h | 10 ------- ctdb/protocol/protocol_client.c | 58 ----------------------------------------- 2 files changed, 68 deletions(-) (limited to 'ctdb') diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h index 83ebd4862ff..d165ba25ade 100644 --- a/ctdb/protocol/protocol_api.h +++ b/ctdb/protocol/protocol_api.h @@ -299,10 +299,6 @@ int ctdb_reply_control_get_pnn(struct ctdb_reply_control *reply, void ctdb_req_control_shutdown(struct ctdb_req_control *request); int ctdb_reply_control_shutdown(struct ctdb_reply_control *reply); -void ctdb_req_control_get_monmode(struct ctdb_req_control *request); -int ctdb_reply_control_get_monmode(struct ctdb_reply_control *reply, - int *mon_mode); - void ctdb_req_control_tcp_client(struct ctdb_req_control *request, struct ctdb_connection *conn); int ctdb_reply_control_tcp_client(struct ctdb_reply_control *reply); @@ -388,12 +384,6 @@ int ctdb_reply_control_try_delete_records(struct ctdb_reply_control *reply, TALLOC_CTX *mem_ctx, struct ctdb_rec_buffer **recbuf); -void ctdb_req_control_enable_monitor(struct ctdb_req_control *request); -int ctdb_reply_control_enable_monitor(struct ctdb_reply_control *reply); - -void ctdb_req_control_disable_monitor(struct ctdb_req_control *request); -int ctdb_reply_control_disable_monitor(struct ctdb_reply_control *reply); - void ctdb_req_control_add_public_ip(struct ctdb_req_control *request, struct ctdb_addr_info *addr_info); int ctdb_reply_control_add_public_ip(struct ctdb_reply_control *reply); diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c index dbe13d0be79..d750260ff8a 100644 --- a/ctdb/protocol/protocol_client.c +++ b/ctdb/protocol/protocol_client.c @@ -720,31 +720,6 @@ int ctdb_reply_control_shutdown(struct ctdb_reply_control *reply) /* CTDB_CONTROL_GET_MONMODE */ -void ctdb_req_control_get_monmode(struct ctdb_req_control *request) -{ - request->opcode = CTDB_CONTROL_GET_MONMODE; - request->pad = 0; - request->srvid = 0; - request->client_id = 0; - request->flags = 0; - - request->rdata.opcode = CTDB_CONTROL_GET_MONMODE; -} - -int ctdb_reply_control_get_monmode(struct ctdb_reply_control *reply, - int *mon_mode) -{ - if (reply->rdata.opcode != CTDB_CONTROL_GET_MONMODE) { - return EPROTO; - } - - if (reply->status >= 0) { - *mon_mode = reply->status; - reply->status = 0; - } - return reply->status; -} - /* CTDB_CONTROL_TCP_CLIENT */ void ctdb_req_control_tcp_client(struct ctdb_req_control *request, @@ -1196,41 +1171,8 @@ int ctdb_reply_control_try_delete_records(struct ctdb_reply_control *reply, } /* CTDB_CONTROL_ENABLE_MONITOR */ - -void ctdb_req_control_enable_monitor(struct ctdb_req_control *request) -{ - request->opcode = CTDB_CONTROL_ENABLE_MONITOR; - request->pad = 0; - request->srvid = 0; - request->client_id = 0; - request->flags = 0; - - request->rdata.opcode = CTDB_CONTROL_ENABLE_MONITOR; -} - -int ctdb_reply_control_enable_monitor(struct ctdb_reply_control *reply) -{ - return ctdb_reply_control_generic(reply, CTDB_CONTROL_ENABLE_MONITOR); -} - /* CTDB_CONTROL_DISABLE_MONITOR */ -void ctdb_req_control_disable_monitor(struct ctdb_req_control *request) -{ - request->opcode = CTDB_CONTROL_DISABLE_MONITOR; - request->pad = 0; - request->srvid = 0; - request->client_id = 0; - request->flags = 0; - - request->rdata.opcode = CTDB_CONTROL_DISABLE_MONITOR; -} - -int ctdb_reply_control_disable_monitor(struct ctdb_reply_control *reply) -{ - return ctdb_reply_control_generic(reply, CTDB_CONTROL_DISABLE_MONITOR); -} - /* CTDB_CONTROL_ADD_PUBLIC_IP */ void ctdb_req_control_add_public_ip(struct ctdb_req_control *request, -- cgit v1.2.1