From f2d496f39a027ca139ab5ca4762823caf9de0854 Mon Sep 17 00:00:00 2001 From: Micke Prag Date: Tue, 8 Sep 2009 13:04:30 +0000 Subject: [PATCH] If model if appended with ':anything' this is stripped and ignored, see #51 --- driver/libtelldus-core/Manager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/driver/libtelldus-core/Manager.cpp b/driver/libtelldus-core/Manager.cpp index 1149e78b..c1dc9a44 100644 --- a/driver/libtelldus-core/Manager.cpp +++ b/driver/libtelldus-core/Manager.cpp @@ -79,6 +79,12 @@ Device *Manager::getDevice(int intDeviceId){ std::string protocol = settings.getProtocol(intDeviceId); std::string strModel = settings.getModel(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 if (strcasecmp(protocol.c_str(), "arctech") == 0){