Commit 4258bba624097e266a28d49062dce0662915cd83

Con Kolivas 2014-03-09T21:16:22

Default to stratum+tcp:// on any urls that don't have a prefix instead of http.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/cgminer.c b/cgminer.c
index 45fdc2e..f16d879 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -834,11 +834,11 @@ static void setup_url(struct pool *pool, char *arg)
 	    strncmp(arg, "https://", 8)) {
 		char *httpinput;
 
-		httpinput = malloc(255);
+		httpinput = malloc(256);
 		if (!httpinput)
 			quit(1, "Failed to malloc httpinput");
-		strcpy(httpinput, "http://");
-		strncat(httpinput, arg, 248);
+		strcpy(httpinput, "stratum+tcp://");
+		strncat(httpinput, arg, 242);
 		pool->rpc_url = httpinput;
 	}
 }