diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2008-04-13 16:17:11 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2008-04-13 16:17:11 +0000 |
| commit | 2cba77f52772f944f7da83750cf88f74514d2e6a (patch) | |
| tree | fa8c6cf953003634d9cf0da5a978eb27f798aed3 /src/pedro/pedroxmpp.cpp | |
| parent | address some char* string literal warnings. (diff) | |
| download | inkscape-2cba77f52772f944f7da83750cf88f74514d2e6a.tar.gz inkscape-2cba77f52772f944f7da83750cf88f74514d2e6a.zip | |
make saslMd5Authenticate() error message a bit smarter
(bzr r5415)
Diffstat (limited to 'src/pedro/pedroxmpp.cpp')
| -rw-r--r-- | src/pedro/pedroxmpp.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/pedro/pedroxmpp.cpp b/src/pedro/pedroxmpp.cpp index 72a0cb832..757a883da 100644 --- a/src/pedro/pedroxmpp.cpp +++ b/src/pedro/pedroxmpp.cpp @@ -4,7 +4,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005-2007 Bob Jamison + * Copyright (C) 2005-2008 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1738,6 +1738,20 @@ bool XmppClient::saslMd5Authenticate() delete elem; return true; } + else + { + std::vector<Element *> list = elem->findElements("failure"); + if (list.size() > 0) + { + DOMString errmsg = ""; + Element *errmsgElem = list[0]->getFirstChild(); + if (errmsgElem) + errmsg = errmsgElem->getName(); + error("login: initial md5 authentication failed: %s", errmsg.c_str()); + delete elem; + return false; + } + } //# Continue for one more SASL cycle b64challenge = elem->getTagValue("challenge"); delete elem; |
