Code

Allow server to skip final "rspauth" SASL handshake
authorishmal <ishmal@users.sourceforge.net>
Mon, 12 Mar 2007 21:14:51 +0000 (21:14 +0000)
committerishmal <ishmal@users.sourceforge.net>
Mon, 12 Mar 2007 21:14:51 +0000 (21:14 +0000)
src/pedro/pedroxmpp.cpp

index 4082881875bbf237dafebcf3430647dd3477e419..2dc20debaf372148c8b4e4447bc3a038496e414c 100644 (file)
@@ -1726,6 +1726,13 @@ bool XmppClient::saslMd5Authenticate()
     status("server says:: '%s'", recbuf.c_str());
     elem = parser.parse(recbuf);
     //elem->print();
+    //# Early success?
+    if (elem->findElements("success").size() > 0)
+        {
+        delete elem;
+        return true;
+        }
+    //# Continue for one more SASL cycle
     b64challenge = elem->getTagValue("challenge");
     delete elem;