Browse Source

Extract any proxy url and port to be used by sockaddr if possible using extract_sockaddr.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
b783d94c6d
  1. 3
      miner.h
  2. 1
      util.c

3
miner.h

@ -1183,6 +1183,9 @@ struct pool { @@ -1183,6 +1183,9 @@ struct pool {
char *sockbuf;
size_t sockbuf_size;
char *sockaddr_url; /* stripped url used for sockaddr */
char *sockaddr_proxy_url;
char *sockaddr_proxy_port;
char *nonce1;
unsigned char *nonce1bin;
size_t n1_len;

1
util.c

@ -567,6 +567,7 @@ char *get_proxy(char *url, struct pool *pool) @@ -567,6 +567,7 @@ char *get_proxy(char *url, struct pool *pool)
quithere(1, "Failed to malloc rpc_proxy");
strcpy(pool->rpc_proxy, url + plen);
extract_sockaddr(pool->rpc_proxy, &pool->sockaddr_proxy_url, &pool->sockaddr_proxy_port);
pool->rpc_proxytype = proxynames[i].proxytype;
url = split + 1;
break;

Loading…
Cancel
Save