From fced503ed6c771e1089a3680536a63015add5fb2 Mon Sep 17 00:00:00 2001 From: Kano Date: Wed, 12 Sep 2012 19:45:49 +1000 Subject: [PATCH] save individual pool proxy settings to config --- cgminer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cgminer.c b/cgminer.c index 8adc8825..b0197983 100644 --- a/cgminer.c +++ b/cgminer.c @@ -3098,7 +3098,11 @@ void write_config(FILE *fcfg) /* Write pool values */ fputs("{\n\"pools\" : [", fcfg); for(i = 0; i < total_pools; i++) { - fprintf(fcfg, "%s\n\t{\n\t\t\"url\" : \"%s\",", i > 0 ? "," : "", json_escape(pools[i]->rpc_url)); + fprintf(fcfg, "%s\n\t{\n\t\t\"url\" : \"%s%s%s%s\",", i > 0 ? "," : "", + pools[i]->rpc_proxy ? json_escape((char *)proxytype(pools[i]->rpc_proxytype)) : "", + pools[i]->rpc_proxy ? json_escape(pools[i]->rpc_proxy) : "", + pools[i]->rpc_proxy ? "|" : "", + json_escape(pools[i]->rpc_url)); fprintf(fcfg, "\n\t\t\"user\" : \"%s\",", json_escape(pools[i]->rpc_user)); fprintf(fcfg, "\n\t\t\"pass\" : \"%s\"\n\t}", json_escape(pools[i]->rpc_pass)); }