summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-07-09 19:04:43 +0200
committerGitHub <noreply@github.com>2017-07-09 19:04:43 +0200
commit74c691470c57f447e3c1c118c4a4ee4bc366f2ff (patch)
treef1a4b139291ee173af7f25ed8ef3313eb1abd1b7
parentb258146b5cbc38100715a3405f47e67d3fec5779 (diff)
parent4e943d2a1ca97bb4bd8c8969cbe9632f3aa6ceb9 (diff)
downloadxmr-stak-74c691470c57f447e3c1c118c4a4ee4bc366f2ff.zip
xmr-stak-74c691470c57f447e3c1c118c4a4ee4bc366f2ff.tar.gz
Merge pull request #197 from fireice-uk/topic-uri-fix
Fix handling of stratum+tcp:// format
-rw-r--r--socket.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/socket.cpp b/socket.cpp
index 565eb76..257da22 100644
--- a/socket.cpp
+++ b/socket.cpp
@@ -56,7 +56,10 @@ bool plain_socket::set_hostname(const char* sAddr)
sAddrMb[ln] = '\0';
if ((sTmp = strstr(sAddrMb, "//")) != nullptr)
+ {
+ sTmp += 2;
memmove(sAddrMb, sTmp, strlen(sTmp) + 1);
+ }
if ((sPort = strchr(sAddrMb, ':')) == nullptr)
return pCallback->set_socket_error("CONNECT error: Pool port number not specified, please use format <hostname>:<port>.");
OpenPOWER on IntegriCloud