diff --git a/src/lib/ebus/message.cpp b/src/lib/ebus/message.cpp index 52bb00fe..0252266f 100644 --- a/src/lib/ebus/message.cpp +++ b/src/lib/ebus/message.cpp @@ -409,8 +409,10 @@ Message* MessageMap::find(const string& clazz, const string& name, const bool is string key; if (i==0) key = string(isPassive ? "P" : (isSet ? "W" : "R")) + clazz + FIELD_SEPARATOR + name; - else + else if (clazz.length() == 0) key = string(isPassive ? "-P" : (isSet ? "-W" : "-R")) + name; // second try: without class + else + continue; // not allowed without class map::iterator it = m_messagesByName.find(key); if (it != m_messagesByName.end()) return it->second;