mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.19.8
This commit is contained in:
17
util.c
17
util.c
@@ -1542,11 +1542,20 @@ bool stratum_connect(struct stratum_ctx *sctx, const char *url)
|
||||
free(sctx->url);
|
||||
sctx->url = strdup(url);
|
||||
}
|
||||
free(sctx->curl_url);
|
||||
|
||||
free(sctx->curl_url);
|
||||
sctx->curl_url = (char*) malloc(strlen(url));
|
||||
sprintf( sctx->curl_url, "http%s", strstr( url, "s://" )
|
||||
? strstr( url, "s://" )
|
||||
: strstr (url, "://" ) );
|
||||
|
||||
// replace the stratum protocol prefix with http, https for ssl
|
||||
sprintf( sctx->curl_url, "%s%s",
|
||||
( strstr( url, "s://" ) || strstr( url, "ssl://" ) )
|
||||
? "https" : "http", strstr( url, "://" ) );
|
||||
|
||||
|
||||
|
||||
// sprintf( sctx->curl_url, "http%s", strstr( url, "s://" )
|
||||
// ? strstr( url, "s://" )
|
||||
// : strstr (url, "://" ) );
|
||||
|
||||
if (opt_protocol)
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
|
||||
Reference in New Issue
Block a user