From 5b560ea27ca17b2c77136ab991e1fd5cdce6b308 Mon Sep 17 00:00:00 2001 From: john30 Date: Fri, 26 Dec 2014 20:03:21 +0100 Subject: [PATCH] deny matching any class if class is explicitly requested --- src/lib/ebus/message.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;