Replicate G4KLX patch against YSF2DMR

This commit is contained in:
root
2020-06-06 19:22:56 +01:00
parent 687fa0b156
commit b4f762dca1
3 changed files with 36 additions and 35 deletions
+10 -20
View File
@@ -154,7 +154,6 @@ bool CConf::read()
// Remove quotes from the value
size_t len = ::strlen(value);
char *t;
unsigned char tokencnt = 0;
if (len > 1U && *value == '"' && value[len - 1U] == '"') {
value[len - 1U] = '\0';
value++;
@@ -190,7 +189,7 @@ bool CConf::read()
else if (::strcmp(key, "Daemon") == 0)
m_daemon = ::atoi(value) == 1;
else if (::strcmp(key, "RadioID") == 0)
::memcpy(m_ysfRadioID, value, 5);
m_ysfRadioID = value;
else if (::strcmp(key, "FICHCallsign") == 0)
m_fichCallSign = ::atoi(value);
else if (::strcmp(key, "FICHCallMode") == 0)
@@ -207,21 +206,12 @@ bool CConf::read()
m_fichSQLType = ::atoi(value);
else if (::strcmp(key, "FICHSQLCode") == 0)
m_fichSQLCode = ::atoi(value);
else if (::strcmp(key, "DT1") == 0){
tokencnt = 0;
while((t = strtok_r(value, ",", &value)) != NULL){
if(tokencnt < 10){
m_ysfDT1[tokencnt++] = atoi(t);
}
}
}
else if (::strcmp(key, "DT2") == 0){
tokencnt = 0;
while((t = strtok_r(value, ",", &value)) != NULL){
if(tokencnt < 10){
m_ysfDT2[tokencnt++] = atoi(t);
}
}
else if (::strcmp(key, "DT1") == 0){
while ((t = strtok_r(value, ",", &value)) != NULL)
m_ysfDT1.push_back(::atoi(t));
} else if (::strcmp(key, "DT2") == 0){
while ((t = strtok_r(value, ",", &value)) != NULL)
m_ysfDT2.push_back(::atoi(t));
}
} else if (section == SECTION_INFO) {
if (::strcmp(key, "TXFrequency") == 0)
@@ -421,17 +411,17 @@ unsigned char CConf::getFICHSQLCode() const
return m_fichSQLCode;
}
unsigned char* CConf::getYsfDT1()
std::vector<unsigned char> CConf::getYsfDT1()
{
return m_ysfDT1;
}
unsigned char* CConf::getYsfDT2()
std::vector<unsigned char> CConf::getYsfDT2()
{
return m_ysfDT2;
}
char* CConf::getYsfRadioID()
std::string CConf::getYsfRadioID()
{
return m_ysfRadioID;
}