summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 03e0111)
raw | patch | inline | side by side (parent: 03e0111)
author | ishmal <ishmal@users.sourceforge.net> | |
Mon, 28 Aug 2006 14:07:04 +0000 (14:07 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Mon, 28 Aug 2006 14:07:04 +0000 (14:07 +0000) |
src/pedro/pedroxmpp.cpp | patch | blob | history |
index b882b9ab9106be68a21d4e932aa018a6f7f97005..398e6722bab97ce8a42b90c94138c292fee48ec4 100644 (file)
--- a/src/pedro/pedroxmpp.cpp
+++ b/src/pedro/pedroxmpp.cpp
Element *elem = parser.parse(recbuf);
//elem->print();
- //# does the entity send the "instructions" tag?
+ //# does the entity send the newer "instructions" tag?
std::vector<Element *> fields = elem->findElements("field");
std::vector<DOMString> fnames;
for (unsigned int i=0; i<fields.size() ; i++)
status("field name:%s", fname.c_str());
}
- delete elem;
-
+ //Do we have any fields?
if (fnames.size() == 0)
{
- error("server did not offer registration");
- return false;
+ //If no fields, maybe the older method was offered
+ if (elem->findElements("username").size() == 0 ||
+ elem->findElements("password").size() == 0)
+ {
+ error("server did not offer registration");
+ delete elem;
+ return false;
+ }
}
+ delete elem;
fmt =
"<iq type='set' id='regnew%d'>"