[PATCH 2/3] cfg: remove crypto_set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 exec/cfg.c       |   73 ------------------------------------------------------
 lib/cfg.c        |   37 ---------------------------
 lib/libcfg.verso |    2 +-
 3 files changed, 1 insertions(+), 111 deletions(-)

diff --git a/exec/cfg.c b/exec/cfg.c
index 659bd99..3526b5a 100644
--- a/exec/cfg.c
+++ b/exec/cfg.c
@@ -71,7 +71,6 @@ enum cfg_message_req_types {
         MESSAGE_REQ_EXEC_CFG_RINGREENABLE = 0,
 	MESSAGE_REQ_EXEC_CFG_KILLNODE = 1,
 	MESSAGE_REQ_EXEC_CFG_SHUTDOWN = 2,
-	MESSAGE_REQ_EXEC_CFG_CRYPTO_SET = 3
 };
 
 #define DEFAULT_SHUTDOWN_TIMEOUT 5
@@ -123,10 +122,6 @@ static void message_handler_req_exec_cfg_shutdown (
         const void *message,
         unsigned int nodeid);
 
-static void message_handler_req_exec_cfg_crypto_set (
-        const void *message,
-        unsigned int nodeid);
-
 static void exec_cfg_killnode_endian_convert (void *msg);
 
 static void message_handler_req_lib_cfg_ringstatusget (
@@ -157,10 +152,6 @@ static void message_handler_req_lib_cfg_local_get (
 	void *conn,
 	const void *msg);
 
-static void message_handler_req_lib_cfg_crypto_set (
-	void *conn,
-	const void *msg);
-
 /*
  * Service Handler Definition
  */
@@ -193,10 +184,6 @@ static struct corosync_lib_handler cfg_lib_engine[] =
 	{ /* 6 */
 		.lib_handler_fn		= message_handler_req_lib_cfg_local_get,
 		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
-	},
-	{ /* 7 */
-		.lib_handler_fn		= message_handler_req_lib_cfg_crypto_set,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
 	}
 };
 
@@ -211,9 +198,6 @@ static struct corosync_exec_handler cfg_exec_engine[] =
 	},
 	{ /* 2 */
 		.exec_handler_fn = message_handler_req_exec_cfg_shutdown,
-	},
-	{ /* 3 */
-		.exec_handler_fn = message_handler_req_exec_cfg_crypto_set,
 	}
 };
 
@@ -253,11 +237,6 @@ struct req_exec_cfg_killnode {
 	mar_name_t reason __attribute__((aligned(8)));
 };
 
-struct req_exec_cfg_crypto_set {
-	struct qb_ipc_request_header header __attribute__((aligned(8)));
-	mar_uint32_t type __attribute__((aligned(8)));
-};
-
 struct req_exec_cfg_shutdown {
 	struct qb_ipc_request_header header __attribute__((aligned(8)));
 };
@@ -551,21 +530,6 @@ static void message_handler_req_exec_cfg_shutdown (
 	LEAVE();
 }
 
-static void message_handler_req_exec_cfg_crypto_set (
-        const void *message,
-        unsigned int nodeid)
-{
-	const struct req_exec_cfg_crypto_set *req_exec_cfg_crypto_set = message;
-	ENTER();
-
-	log_printf(LOGSYS_LEVEL_NOTICE, "Node %d requested set crypto to %d",
-		nodeid, req_exec_cfg_crypto_set->type);
-
-	api->totem_crypto_set(req_exec_cfg_crypto_set->type);
-	LEAVE();
-}
-
-
 /*
  * Library Interface Implementation
  */
@@ -868,40 +832,3 @@ static void message_handler_req_lib_cfg_local_get (void *conn, const void *msg)
 	api->ipc_response_send(conn, &res_lib_cfg_local_get,
 		sizeof(res_lib_cfg_local_get));
 }
-
-
-static void message_handler_req_lib_cfg_crypto_set (
-	void *conn,
-	const void *msg)
-{
-	const struct req_lib_cfg_crypto_set *req_lib_cfg_crypto_set = msg;
-	struct res_lib_cfg_crypto_set res_lib_cfg_crypto_set;
-	struct req_exec_cfg_crypto_set req_exec_cfg_crypto_set;
-	struct iovec iovec;
-	int ret = CS_ERR_INVALID_PARAM;
-
-	req_exec_cfg_crypto_set.header.size =
-		sizeof (struct req_exec_cfg_crypto_set);
-	req_exec_cfg_crypto_set.header.id = SERVICE_ID_MAKE (CFG_SERVICE,
-		MESSAGE_REQ_EXEC_CFG_CRYPTO_SET);
-
-	/*
-	 * Set it locally first so we can tell if it is allowed
-	 */
-	if (api->totem_crypto_set(req_lib_cfg_crypto_set->type) == 0) {
-
-		req_exec_cfg_crypto_set.type = req_lib_cfg_crypto_set->type;
-
-		iovec.iov_base = (char *)&req_exec_cfg_crypto_set;
-		iovec.iov_len = sizeof (struct req_exec_cfg_crypto_set);
-		assert (api->totem_mcast (&iovec, 1, TOTEM_SAFE) == 0);
-		ret = CS_OK;
-	}
-
-	res_lib_cfg_crypto_set.header.size = sizeof(res_lib_cfg_crypto_set);
-	res_lib_cfg_crypto_set.header.id = MESSAGE_RES_CFG_CRYPTO_SET;
-	res_lib_cfg_crypto_set.header.error = ret;
-
-	api->ipc_response_send(conn, &res_lib_cfg_crypto_set,
-		sizeof(res_lib_cfg_crypto_set));
-}
diff --git a/lib/cfg.c b/lib/cfg.c
index 9402105..34b8ea4 100644
--- a/lib/cfg.c
+++ b/lib/cfg.c
@@ -605,40 +605,3 @@ error_exit:
 
 	return (error);
 }
-
-cs_error_t
-corosync_cfg_crypto_set (
-	corosync_cfg_handle_t handle,
-	unsigned int type)
-{
-	struct cfg_inst *cfg_inst;
-	struct req_lib_cfg_crypto_set req_lib_cfg_crypto_set;
-	struct res_lib_cfg_crypto_set res_lib_cfg_crypto_set;
-	struct iovec iov;
-	cs_error_t error;
-
-
-	error = hdb_error_to_cs(hdb_handle_get (&cfg_hdb, handle, (void *)&cfg_inst));
-	if (error != CS_OK) {
-		return (error);
-	}
-
-	req_lib_cfg_crypto_set.header.id = MESSAGE_REQ_CFG_CRYPTO_SET;
-	req_lib_cfg_crypto_set.header.size = sizeof (struct req_lib_cfg_crypto_set);
-	req_lib_cfg_crypto_set.type = type;
-
-	iov.iov_base = (void *)&req_lib_cfg_crypto_set;
-	iov.iov_len = sizeof (struct req_lib_cfg_crypto_set);
-
-	error = qb_to_cs_error (qb_ipcc_sendv_recv (cfg_inst->c,
-		&iov,
-		1,
-		&res_lib_cfg_crypto_set,
-		sizeof (struct res_lib_cfg_crypto_set), CS_IPC_TIMEOUT_MS));
-
-	if (error == CS_OK)
-		error = res_lib_cfg_crypto_set.header.error;
-
-	(void)hdb_handle_put (&cfg_hdb, handle);
-	return (error);
-}
diff --git a/lib/libcfg.verso b/lib/libcfg.verso
index 0062ac9..09b254e 100644
--- a/lib/libcfg.verso
+++ b/lib/libcfg.verso
@@ -1 +1 @@
-5.0.0
+6.0.0
-- 
1.7.1

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux