mirror of
https://github.com/g4klx/DMRGateway.git
synced 2026-04-06 23:13:48 +00:00
Fix: XLX ID as 3 characters string instead of a number.
* Since some XLX reflectors are using characters instead of numbers (like USA,JPN,etc...), it's not possible to use them as startup reflector. * Of course, it's still not possible to switch to that kind of reflector using the xlxBase + 4000 trick. Update Copyright year.
This commit is contained in:
parent
518c2a6136
commit
4f9f30b678
8 changed files with 59 additions and 49 deletions
|
|
@ -63,7 +63,7 @@ bool CReflectors::load()
|
|||
|
||||
if (p1 != NULL && p2 != NULL && p3 != NULL) {
|
||||
CReflector* refl = new CReflector;
|
||||
refl->m_id = (unsigned int)::atoi(p1);
|
||||
refl->m_id = std::string(p1);
|
||||
refl->m_address = std::string(p2);
|
||||
refl->m_startup = (unsigned int)::atoi(p3);
|
||||
m_reflectors.push_back(refl);
|
||||
|
|
@ -83,14 +83,14 @@ bool CReflectors::load()
|
|||
return true;
|
||||
}
|
||||
|
||||
CReflector* CReflectors::find(unsigned int id)
|
||||
CReflector* CReflectors::find(const std::string &id)
|
||||
{
|
||||
for (std::vector<CReflector*>::iterator it = m_reflectors.begin(); it != m_reflectors.end(); ++it) {
|
||||
if (id == (*it)->m_id)
|
||||
return *it;
|
||||
}
|
||||
|
||||
LogMessage("Trying to find non existent XLX reflector with an id of %u", id);
|
||||
LogMessage("Trying to find non existent XLX reflector with an id of %s", id.c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue