Commit 44bcc32234b224fea26fc67f8bc4309969b3d6d9

Con Kolivas 2011-07-22T12:14:24

Display current pool management strategy to enable changing it on the fly.

diff --git a/main.c b/main.c
index ae68559..da60991 100644
--- a/main.c
+++ b/main.c
@@ -106,6 +106,15 @@ enum pool_strategy {
 	POOL_LOADBALANCE,
 };
 
+struct strategies {
+	const char *s;
+} strategies[] = {
+	{ "Failover" },
+	{ "Round Robin" },
+	{ "Rotate" },
+	{ "Load Balance" },
+};
+
 static const char *algo_names[] = {
 	[ALGO_C]		= "c",
 #ifdef WANT_SSE2_4WAY
@@ -1412,7 +1421,8 @@ updated:
 		wattroff(logwin, A_BOLD | A_DIM);
 	}
 retry:
-	wprintw(logwin, "\n[A]dd pool [S]witch pool [D]isable pool [E]nable pool\n");
+	wprintw(logwin, "\nCurrent pool management strategy: %s\n", strategies[pool_strategy]);
+	wprintw(logwin, "[A]dd pool [S]witch pool [D]isable pool [E]nable pool\n");
 	wprintw(logwin, "Or press any other key to continue\n");
 	wrefresh(logwin);
 	pthread_mutex_unlock(&curses_lock);