]> git.michaelhowe.org Git - packages/p/paho-mqtt.git/commitdiff
Fix topic comparison.
authorRoger Light <roger@atchoo.org>
Sat, 7 Dec 2013 23:43:45 +0000 (23:43 +0000)
committerRoger Light <roger@atchoo.org>
Mon, 3 Feb 2014 21:20:23 +0000 (21:20 +0000)
src/paho/mqtt/client.py

index 7cfd1ca32fe1db63600f9369d547cd68500a666a..47b23a4478231db1aa3ac4f830e4d1abb7efd398 100755 (executable)
@@ -200,6 +200,11 @@ def topic_matches_sub(sub, topic):
         if sub[spos] == topic[tpos]:
             spos += 1
             tpos += 1
+
+            if tpos == tlen and spos == slen-1 and sub[spos] == '+':
+                spos += 1
+                result = True
+                break
         else:
             if sub[spos] == '+':
                 spos += 1