From 46703ad50d0f07f8f491c44ade764b6dca1f636f Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 11 Oct 2016 13:19:31 +0200 Subject: [PATCH] Fixed triggers only prefix-matching on stream names --- lib/triggers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/triggers.cpp b/lib/triggers.cpp index 9cdf1ad1..3b9d3143 100644 --- a/lib/triggers.cpp +++ b/lib/triggers.cpp @@ -199,7 +199,8 @@ bool doTrigger(const std::string type, const std::string &payload, const std::st while( totalLen>((unsigned int)(bytepos-startBytepos)) ){ unsigned int stringLen=((unsigned int *)bytepos)[0]; bytepos+=4; - if (strncmp(bytepos, streamName.c_str(), stringLen) == 0){ + size_t splitter = streamName.find_first_of("+ "); + if ((streamName.size() == stringLen || splitter == stringLen) && strncmp(bytepos, streamName.c_str(), stringLen) == 0){ isHandled = true; } bytepos+=stringLen;