Fixed triggers only prefix-matching on stream names
This commit is contained in:
		
							parent
							
								
									55f1c539ad
								
							
						
					
					
						commit
						46703ad50d
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue