Fixed reversed-logic error in checking for duplicate stanza extension types.
authorChris Jones <christian.jones@sri.com>
Sat, 07 Sep 2013 19:53:58 -0700
changeset 132 feaa24de9597
parent 131 f9ccfaf672ed
child 133 c4e0b897db83
Fixed reversed-logic error in checking for duplicate stanza extension types.
xmpp/xmpp.go
--- a/xmpp/xmpp.go	Sat Sep 07 19:49:57 2013 -0700
+++ b/xmpp/xmpp.go	Sat Sep 07 19:53:58 2013 -0700
@@ -147,7 +147,7 @@
 	extStanza := make(map[xml.Name]reflect.Type)
 	for _, ext := range exts {
 		for k, v := range ext.StanzaHandlers {
-			if _, ok := extStanza[k]; !ok {
+			if _, ok := extStanza[k]; ok {
 				return nil, fmt.Errorf("duplicate handler %s",
 					k)
 			}