]> git.proxmox.com Git - mirror_corosync.git/commitdiff
cfg: remove crypto_set
authorJan Friesse <jfriesse@redhat.com>
Tue, 13 Mar 2012 08:36:55 +0000 (09:36 +0100)
committerJan Friesse <jfriesse@redhat.com>
Tue, 13 Mar 2012 11:23:10 +0000 (12:23 +0100)
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
exec/cfg.c
lib/cfg.c
lib/libcfg.verso

index 659bd99171bd81e97ddce4a3c1430cb72590388b..03cd6c136281c6922a50ed8593aa8293f7d67270 100644 (file)
@@ -70,8 +70,7 @@ LOGSYS_DECLARE_SUBSYS ("CFG");
 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
+       MESSAGE_REQ_EXEC_CFG_SHUTDOWN = 2
 };
 
 #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));
-}
index 940210580f0dd345ba2b3e3bcc9753b65019a27e..34b8ea4f0d63837cb5d6a1330336c779b8d3e432 100644 (file)
--- 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);
-}
index 0062ac971805f7b700058db4bb0f5c5b771dda76..09b254e90c61ed28bb68a54752cf04f6a736a7d3 100644 (file)
@@ -1 +1 @@
-5.0.0
+6.0.0