From 31bf51d09b3cf2817dacc3a46cf89fa596d7565f Mon Sep 17 00:00:00 2001 From: Colby Ross Date: Sat, 18 Aug 2018 19:49:38 -0400 Subject: [PATCH] Correcting default ICOM ip addresses. (#6) --- QnetGateway.cpp | 6 +++--- QnetRemote.cpp | 2 +- qn.icom.cfg | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/QnetGateway.cpp b/QnetGateway.cpp index b6e79b4..c39a743 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -285,7 +285,7 @@ bool CQnetGateway::read_config(char *cfgFile) return true; } - if (! get_value(cfg, std::string(path+"ip").c_str(), rptr.mod[m].portip.ip, 7, IP_SIZE, is_icom ? "172.16.0.20" : "127.0.0.1")) + if (! get_value(cfg, std::string(path+"ip").c_str(), rptr.mod[m].portip.ip, 7, IP_SIZE, is_icom ? "172.16.0.1" : "127.0.0.1")) return true; get_value(cfg, std::string(path+"port").c_str(), rptr.mod[m].portip.port, 16000, 65535, is_icom ? 20000 : 19998+m); get_value(cfg, std::string(path+"frequency").c_str(), rptr.mod[m].frequency, 0.0, 1.0e12, 0.0); @@ -349,7 +349,7 @@ bool CQnetGateway::read_config(char *cfgFile) get_value(cfg, path+"external.port", g2_external.port, 1024, 65535, 40000); - if (! get_value(cfg, path+"internal.ip", g2_internal.ip, 7, IP_SIZE, is_icom ? "172.16.0.1" : "0.0.0.0")) + if (! get_value(cfg, path+"internal.ip", g2_internal.ip, 7, IP_SIZE, is_icom ? "172.16.0.20" : "0.0.0.0")) return true; get_value(cfg, path+"internal.port", g2_internal.port, 16000, 65535, is_icom ? 20000 : 19000); @@ -2597,7 +2597,7 @@ int CQnetGateway::init(char *cfgfile) // Open G2 INTERNAL: // default non-icom 127.0.0.1:19000 - // default icom 172.16.0.1:20000 + // default icom 172.16.0.20:20000 srv_sock = open_port(g2_internal); if (0 > srv_sock) { printf("Can't open %s:%d\n", g2_internal.ip.c_str(), g2_internal.port); diff --git a/QnetRemote.cpp b/QnetRemote.cpp index 77363a5..6eb6436 100644 --- a/QnetRemote.cpp +++ b/QnetRemote.cpp @@ -211,7 +211,7 @@ bool read_config(const char *cfgFile) return true; } - if (! get_value(cfg, "gateway.internal.ip", IP_ADDRESS, 7, 15, is_icom ? "172.16.0.1" : "127.0.0.1")) + if (! get_value(cfg, "gateway.internal.ip", IP_ADDRESS, 7, 15, is_icom ? "172.16.0.20" : "127.0.0.1")) return true; get_value(cfg, "gateway.internal.port", PORT, 16000, 65535, is_icom ? 20000 : 19000); diff --git a/qn.icom.cfg b/qn.icom.cfg index 7fb2aea..7e32f61 100644 --- a/qn.icom.cfg +++ b/qn.icom.cfg @@ -20,7 +20,7 @@ gateway = { } internal = { -# ip = "172.16.0.1" +# ip = "172.16.0.20" # port = 20000 } } @@ -32,7 +32,7 @@ module = { # 70 cm module will use "b" # 2 M module will use "c" # type = "icom" # you must define at least one module by uncommenting the type -# ip = "172.16.0.20" # all icom modules should have the same IP address +# ip = "172.16.0.1" # all icom modules should have the same IP address # port = 20000 # all icom modules should have the same UDP port # frequency = 0 # in MHz, if you specify here, this frequency will show up on the QuadNet USER GATEWAYS webpage # offset = 0 @@ -47,7 +47,7 @@ module = { b = { # type = "icom" -# ip = "172.16.0.20" # all icom modules should have the same IP address +# ip = "172.16.0.1" # all icom modules should have the same IP address # port = 20000 # all icom modules should have the same UDP port # frequency = 0 # offset = 0 @@ -62,7 +62,7 @@ module = { c = { # type = "icom" -# ip = "172.16.0.20" # all icom modules should have the same IP address +# ip = "172.16.0.1" # all icom modules should have the same IP address # port = 20000 # all icom modules should have the same UDP port # frequency = 0 # dvap_offset = 0