Просмотр исходного кода

qnetd: Add warning to test algorithm

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse 9 лет назад
Родитель
Сommit
522e1ff032
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      qdevices/qnetd-algo-test.c

+ 6 - 0
qdevices/qnetd-algo-test.c

@@ -42,6 +42,7 @@
 #include "qnetd-client-send.h"
 #include "qnetd-client-send.h"
 #include "qnetd-log-debug.h"
 #include "qnetd-log-debug.h"
 #include "qnetd-client-algo-timer.h"
 #include "qnetd-client-algo-timer.h"
+#include "utils.h"
 
 
 /*
 /*
  * Called right after client sent init message. This happens after initial accept of client,
  * Called right after client sent init message. This happens after initial accept of client,
@@ -64,6 +65,11 @@ qnetd_algo_test_client_init(struct qnetd_client *client)
 {
 {
 	int *algo_data;
 	int *algo_data;
 
 
+	qnetd_log(LOG_WARNING, "algo-test: Client %s (cluster = '%s', node_id = "
+	    UTILS_PRI_NODE_ID") initiated test algorithm. It's not recommended to use test "
+	    "algorithm because it can create multiple quorate partitions!", client->addr_str,
+	    client->cluster_name, client->node_id);
+
 	qnetd_log(LOG_INFO, "algo-test: client_init");
 	qnetd_log(LOG_INFO, "algo-test: client_init");
 
 
 	client->algorithm_data = malloc(sizeof(int));
 	client->algorithm_data = malloc(sizeof(int));