diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-11 21:35:17 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-11 21:35:17 +0000 |
commit | e8da3ac2c037f645b0f29f12304e8b4c6c2988e0 (patch) | |
tree | 13fd8c422dd3c05840d9927ff71b3dfbee108ae3 /src/dns.cpp | |
parent | 24c169c39fb8b2efb0138cbd9220ae75ecb839bd (diff) |
Dns free() errors fixed
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1055 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r-- | src/dns.cpp | 9 |
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() { } |