fixed IPv6 linking

dev
Tom Early 5 years ago
parent 148c2c20bd
commit 4593ddff84

@ -54,7 +54,7 @@
#include "QnetLink.h" #include "QnetLink.h"
#include "Utilities.h" #include "Utilities.h"
#define LINK_VERSION "QnetLink-606" #define LINK_VERSION "QnetLink-607"
#ifndef BIN_DIR #ifndef BIN_DIR
#define BIN_DIR "/usr/local/bin" #define BIN_DIR "/usr/local/bin"
#endif #endif
@ -665,14 +665,14 @@ bool CQnetLink::ReadConfig(const char *cfgFile)
owner.resize(CALL_SIZE, ' '); owner.resize(CALL_SIZE, ' ');
std::string host; std::string host;
cfg.GetValue("ircddb0_host", estr, host, 0, MAXHOSTNAMELEN); cfg.GetValue("ircddb0_host", estr, host, 0, MAXHOSTNAMELEN);
if (0 == host.compare(0, 4, "rrv6")) if (host.npos == host.find("v6."))
{ {
uses_ipv6 = true; cfg.GetValue("ircddb1_host", estr, host, 0, MAXHOSTNAMELEN);
uses_ipv6 = (host.npos == host.find("v6.")) ? false : true;
} }
else else
{ {
cfg.GetValue("ircddb1_host", estr, host, 0, MAXHOSTNAMELEN); uses_ipv6 = true;
uses_ipv6 = (0 == host.compare(0, 4, "rrv6")) ? true : false;
} }
if (uses_ipv6) if (uses_ipv6)
printf("IPv6 linking is enabled\n"); printf("IPv6 linking is enabled\n");

Loading…
Cancel
Save

Powered by TurnKey Linux.