diff --git a/qdevices/qnetd-algo-ffsplit.c b/qdevices/qnetd-algo-ffsplit.c index dbc5f85..2fede52 100644 --- a/qdevices/qnetd-algo-ffsplit.c +++ b/qdevices/qnetd-algo-ffsplit.c @@ -37,6 +37,7 @@ #include #include "log.h" +#include "log-common.h" #include "qnetd-algo-ffsplit.h" #include "qnetd-log-debug.h" #include "qnetd-cluster-list.h" @@ -627,7 +628,7 @@ qnetd_algo_ffsplit_do(struct qnetd_client *client, int client_leaving, log(LOG_DEBUG, "ffsplit: No quorate partition was selected"); } else { log(LOG_DEBUG, "ffsplit: Quorate partition selected"); - qnetd_log_debug_dump_node_list(client, quorate_partition_node_list); + log_common_debug_dump_node_list(quorate_partition_node_list); } qnetd_algo_ffsplit_update_nodes_state(client, client_leaving, quorate_partition_node_list); diff --git a/qdevices/qnetd-log-debug.c b/qdevices/qnetd-log-debug.c index 926f3d4..dcffae1 100644 --- a/qdevices/qnetd-log-debug.c +++ b/qdevices/qnetd-log-debug.c @@ -33,6 +33,7 @@ */ #include "log.h" +#include "log-common.h" #include "qnetd-log-debug.h" #include "utils.h" @@ -66,20 +67,6 @@ qnetd_log_debug_new_client_connected(struct qnetd_client *client) qnetd_log_debug_dump_cluster(client->cluster); } -void -qnetd_log_debug_dump_node_list(struct qnetd_client *client, const struct node_list *nodes) -{ - struct node_list_entry *node_info; - - log(LOG_DEBUG, " node list:"); - TAILQ_FOREACH(node_info, nodes, entries) { - log(LOG_DEBUG, " node_id = "UTILS_PRI_NODE_ID", " - "data_center_id = "UTILS_PRI_DATACENTER_ID", " - "node_state = %s", node_info->node_id, node_info->data_center_id, - tlv_node_state_to_str(node_info->node_state)); - } -} - void qnetd_log_debug_config_node_list_received(struct qnetd_client *client, uint32_t msg_seq_num, int config_version_set, uint64_t config_version, @@ -96,7 +83,7 @@ qnetd_log_debug_config_node_list_received(struct qnetd_client *client, log(LOG_DEBUG, " config version = " UTILS_PRI_CONFIG_VERSION, config_version); } - qnetd_log_debug_dump_node_list(client, nodes); + log_common_debug_dump_node_list(nodes); } void @@ -113,7 +100,7 @@ qnetd_log_debug_membership_node_list_received(struct qnetd_client *client, log(LOG_DEBUG, " heuristics = %s ", tlv_heuristics_to_str(heuristics)); - qnetd_log_debug_dump_node_list(client, nodes); + log_common_debug_dump_node_list(nodes); } void @@ -127,7 +114,7 @@ qnetd_log_debug_quorum_node_list_received(struct qnetd_client *client, log(LOG_DEBUG, " msg seq num = "UTILS_PRI_MSG_SEQ, msg_seq_num); log(LOG_DEBUG, " quorate = %u", quorate); - qnetd_log_debug_dump_node_list(client, nodes); + log_common_debug_dump_node_list(nodes); } void diff --git a/qdevices/qnetd-log-debug.h b/qdevices/qnetd-log-debug.h index a6d22e3..fa74295 100644 --- a/qdevices/qnetd-log-debug.h +++ b/qdevices/qnetd-log-debug.h @@ -46,9 +46,6 @@ extern void qnetd_log_debug_dump_cluster(struct qnetd_cluster *cluster); extern void qnetd_log_debug_new_client_connected(struct qnetd_client *client); -extern void qnetd_log_debug_dump_node_list(struct qnetd_client *client, - const struct node_list *nodes); - extern void qnetd_log_debug_config_node_list_received(struct qnetd_client *client, uint32_t msg_seq_num, int config_version_set, uint64_t config_version, const struct node_list *nodes, int initial);