If model if appended with ':anything' this is stripped and ignored, see #51

This commit is contained in:
Micke Prag 2009-09-08 13:04:30 +00:00
parent db2902a73a
commit f2d496f39a

View file

@ -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){