Fixed bug if GetBase

pull/2/head
Tom Early 3 years ago
parent 5d677fdd0e
commit 4da009a329

@ -354,7 +354,7 @@ std::string CCallsign::GetBase() const
auto u = GetKey();
std::string rval(u.c, CALLSIGN_LEN);
auto pos = rval.find(' ');
if (std::string::npos == rval.find(' '))
if (std::string::npos != pos)
rval.resize(pos);
return rval;
}

@ -67,7 +67,6 @@ bool CInterlinkMap::LoadFromFile(const std::string &filename)
{
if (m_InterlinkMap.end() == m_InterlinkMap.find(token[0]))
{
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
@ -179,7 +178,19 @@ bool CInterlinkMap::IsCallsignListed(const std::string &callsign, const CIp &ip,
{
return true;
}
else
{
std::cout << ip << " is not equal to " << item->second.GetIp() << std::endl;
}
}
else
{
std::cout << "Problem with linking " << callsign << " modules '" << modules << "'\n";
}
}
else
{
std::cout << "'" << callsign << "' not found in interlink map\n";
}
return false;

@ -65,7 +65,6 @@ void CURFProtocol::Task(void)
if ( Receive4(Buffer, Ip, 20) )
#endif
{
Buffer.Dump("Received buffer");
// crack the packet
if ( IsValidDvFramePacket(Buffer, Frame) )
{

Loading…
Cancel
Save

Powered by TurnKey Linux.