If model if appended with ':anything' this is stripped and ignored, see #51
This commit is contained in:
parent
db2902a73a
commit
f2d496f39a
1 changed files with 6 additions and 0 deletions
|
@ -79,6 +79,12 @@ Device *Manager::getDevice(int intDeviceId){
|
||||||
std::string protocol = settings.getProtocol(intDeviceId);
|
std::string protocol = settings.getProtocol(intDeviceId);
|
||||||
std::string strModel = settings.getModel(intDeviceId);
|
std::string strModel = settings.getModel(intDeviceId);
|
||||||
std::string strName = settings.getName(intDeviceId);
|
std::string strName = settings.getName(intDeviceId);
|
||||||
|
|
||||||
|
//Strip anything after : if it is found
|
||||||
|
size_t pos = strModel.find(":");
|
||||||
|
if (pos != std::string::npos) {
|
||||||
|
strModel = strModel.substr(0, pos);
|
||||||
|
}
|
||||||
|
|
||||||
//each new brand must be added here
|
//each new brand must be added here
|
||||||
if (strcasecmp(protocol.c_str(), "arctech") == 0){
|
if (strcasecmp(protocol.c_str(), "arctech") == 0){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue