summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 30d05e2a3..13a80311a 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -188,11 +188,7 @@ void DNS::dns_init_2(const char* dnsserver) { /* populates servers4 struct with
int i;
in_addr addr4;
char buf[1024];
- if (initdone == 1)
- return;
i4 = 0;
-
- initdone = 1;
srand((unsigned int) TIME);
memset(servers4,'\0',sizeof(in_addr) * DNS_MAX);
if (dns_aton4_s(dnsserver,&addr4) != NULL)
@@ -686,6 +682,11 @@ DNS::DNS(std::string dnsserver)
dns_init_2(dnsserver.c_str());
}
+void DNS::SetNS(std::string dnsserver)
+{
+ dns_init_2(dnsserver.c_str());
+}
+
DNS::~DNS()
{
}