diff --git a/config/urfd.interlink b/config/urfd.interlink index cdb7213..cba9bfd 100644 --- a/config/urfd.interlink +++ b/config/urfd.interlink @@ -3,7 +3,7 @@ # # One line per entry. # Each entry specifies a remote URF to peer with. -# If no Port is specified, 17000 will be used. +# If no Port is specified, 10017 will be used. # If DHT is enabled and the target is also DHT-enabled, then you only # need to specify the URF-Callsign and the Shared-Modules # format: diff --git a/reflector/InterlinkMap.cpp b/reflector/InterlinkMap.cpp index 088e2ed..b51b416 100644 --- a/reflector/InterlinkMap.cpp +++ b/reflector/InterlinkMap.cpp @@ -69,6 +69,8 @@ bool CInterlinkMap::LoadFromFile(const std::string &filename) { CCallsign callsign(token[0]); // read remaining tokens + // 1=IP 2=Modules 3=Port Port is optional and defaults to 10017 + // OR... 1=Modules and the dht will be used for (int i=1; i<4; i++) { token[i] = strtok(nullptr, delim); @@ -85,12 +87,8 @@ bool CInterlinkMap::LoadFromFile(const std::string &filename) std::cout << token[0] << " Port " << port << " is out of range, resetting to 10017." << std::endl; port = 10017; } - m_InterlinkMap[token[0]] = CInterlinkMapItem(token[1], token[3], (uint16_t)port); - } - else - { - m_InterlinkMap[token[0]] = CInterlinkMapItem(token[1], token[2], (uint16_t)port); } + m_InterlinkMap[token[0]] = CInterlinkMapItem(token[1], token[2], (uint16_t)port); } #ifndef NO_DHT else if (token[1]) diff --git a/reflector/URFProtocol.cpp b/reflector/URFProtocol.cpp index b789c68..eaef23f 100644 --- a/reflector/URFProtocol.cpp +++ b/reflector/URFProtocol.cpp @@ -65,6 +65,7 @@ void CURFProtocol::Task(void) if ( Receive4(Buffer, Ip, 20) ) #endif { + Buffer.Dump("Received buffer"); // crack the packet if ( IsValidDvFramePacket(Buffer, Frame) ) { @@ -348,7 +349,7 @@ void CURFProtocol::HandlePeerLinks(void) // send connect packet to re-initiate peer link EncodeConnectPacket(&buffer, it->second.GetModules().c_str()); Send(buffer, it->second.GetIp(), it->second.GetPort()); - std::cout << "Sent connect packet to URF peer " << cs << " @ " << it->second.GetIp() << " for modules " << it->second.GetModules() << std::endl; + std::cout << "Sent connect packet to URF peer " << cs << " @ " << it->second.GetIp() << " for modules " << it->second.GetModules() << " to port " << it->second.GetPort() << std::endl; #ifndef NO_DHT } }