From 5c66fe094d9e68e0f4e2e3fb4052e2d43a75a55c Mon Sep 17 00:00:00 2001 From: Bob Jamison Date: Sun, 13 Apr 2008 17:20:55 +0000 Subject: Make pedro dom list simpler (bzr r5416) --- src/pedro/pedroxmpp.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/pedro/pedroxmpp.cpp') diff --git a/src/pedro/pedroxmpp.cpp b/src/pedro/pedroxmpp.cpp index 757a883da..0dd78c5b8 100644 --- a/src/pedro/pedroxmpp.cpp +++ b/src/pedro/pedroxmpp.cpp @@ -875,7 +875,7 @@ static bool isGroupChat(Element *root) { if (!root) return false; - std::vectorelems = root->findElements("x"); + ElementList elems = root->findElements("x"); for (unsigned int i=0 ; igetAttribute("xmlns"); @@ -1107,7 +1107,7 @@ bool XmppClient::processIq(Element *root) if (root->getTagAttribute("query", "xmlns") == "jabber:iq:roster") { roster.clear(); - std::vectorelems = root->findElements("item"); + ElementList elems = root->findElements("item"); for (unsigned int i=0 ; i list = root->findElements("error"); + ElementList list = root->findElements("error"); if (list.size()==0) { XmppEvent evt(XmppEvent::EVENT_REGISTRATION_CHANGE_PASS); @@ -1167,7 +1167,7 @@ bool XmppClient::processIq(Element *root) else if (id.find("regcancel") != id.npos) { - std::vector list = root->findElements("error"); + ElementList list = root->findElements("error"); if (list.size()==0) { XmppEvent evt(XmppEvent::EVENT_REGISTRATION_CANCEL); @@ -1236,7 +1236,7 @@ bool XmppClient::receiveAndProcess() } //#### MESSAGE - std::vectorelems = root->findElements("message"); + ElementList elems = root->findElements("message"); if (elems.size()>0) { if (!processMessage(root)) @@ -1336,7 +1336,7 @@ bool XmppClient::inBandRegistrationNew() //elem->print(); //# does the entity send the newer "instructions" tag? - std::vector fields = elem->findElements("field"); + ElementList fields = elem->findElements("field"); std::vector fnames; for (unsigned int i=0; iprint(); - std::vector list = elem->findElements("error"); + ElementList list = elem->findElements("error"); if (list.size()>0) { Element *errElem = list[0]; @@ -1732,7 +1732,7 @@ bool XmppClient::saslMd5Authenticate() status("server says:: '%s'", recbuf.c_str()); elem = parser.parse(recbuf); //elem->print(); - //# Early success? + //# Success or failure already? if (elem->findElements("success").size() > 0) { delete elem; @@ -1740,7 +1740,7 @@ bool XmppClient::saslMd5Authenticate() } else { - std::vector list = elem->findElements("failure"); + ElementList list = elem->findElements("failure"); if (list.size() > 0) { DOMString errmsg = ""; @@ -1918,8 +1918,7 @@ bool XmppClient::saslAuthenticate() } //check for sasl authentication mechanisms - std::vector elems = - elem->findElements("mechanism"); + ElementList elems = elem->findElements("mechanism"); if (elems.size() < 1) { error("login: no SASL mechanism offered by server"); -- cgit v1.2.3