Commit 7d2c31e28a78bd73d0055ded5e30912f70f4602e

Con Kolivas 2013-09-07T19:01:13

Display quota and allow it to be modified via the pool menu.

diff --git a/cgminer.c b/cgminer.c
index 25cfd17..fe56d61 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4420,8 +4420,9 @@ updated:
 				wlogprint("Rejecting ");
 				break;
 		}
-		wlogprint("%s Priority %d: %s  User:%s\n",
+		wlogprint("%s Quota %d Prio %d: %s  User:%s\n",
 			pool->idle? "Dead" : "Alive",
+			pool->quota,
 			pool->prio,
 			pool->rpc_url, pool->rpc_user);
 		wattroff(logwin, A_BOLD | A_DIM);
@@ -4432,7 +4433,7 @@ retry:
 	if (pool_strategy == POOL_ROTATE)
 		wlogprint("Set to rotate every %d minutes\n", opt_rotate_period);
 	wlogprint("[F]ailover only %s\n", opt_fail_only ? "enabled" : "disabled");
-	wlogprint("[A]dd pool [R]emove pool [D]isable pool [E]nable pool\n");
+	wlogprint("Pool [A]dd [R]emove [D]isable [E]nable [Q]uota change\n");
 	wlogprint("[C]hange management strategy [S]witch pool [I]nformation\n");
 	wlogprint("Or press any other key to continue\n");
 	logwin_update();
@@ -4526,6 +4527,20 @@ retry:
 		pool = pools[selected];
 		display_pool_summary(pool);
 		goto retry;
+	} else if (!strncasecmp(&input, "q", 1)) {
+		selected = curses_int("Select pool number");
+		if (selected < 0 || selected >= total_pools) {
+			wlogprint("Invalid selection\n");
+			goto retry;
+		}
+		pool = pools[selected];
+		selected = curses_int("Set quota");
+		if (selected < 0) {
+			wlogprint("Invalid negative quota\n");
+			goto retry;
+		}
+		pool->quota = selected;
+		goto updated;
 	} else if (!strncasecmp(&input, "f", 1)) {
 		opt_fail_only ^= true;
 		goto updated;