diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-10-01 09:54:23 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-10-01 09:54:23 (GMT) |
commit | 5166d2def025a4fb1e3c4a723d90dc82669b36ee (patch) | |
tree | 1033c74e60def58cc4df1a675fd9a87edd33dcee /Swift/Controllers | |
parent | 5872f31816ca34c341fff1a90845cc7aeb65293e (diff) | |
download | swift-contrib-5166d2def025a4fb1e3c4a723d90dc82669b36ee.zip swift-contrib-5166d2def025a4fb1e3c4a723d90dc82669b36ee.tar.bz2 |
Don't loop when searching a server that has the same JID with different nodes.
Resolves: #356
Diffstat (limited to 'Swift/Controllers')
-rw-r--r-- | Swift/Controllers/Chat/MUCSearchController.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/MUCSearchController.cpp b/Swift/Controllers/Chat/MUCSearchController.cpp index 93d2087..304de85 100644 --- a/Swift/Controllers/Chat/MUCSearchController.cpp +++ b/Swift/Controllers/Chat/MUCSearchController.cpp @@ -136,7 +136,12 @@ void MUCSearchController::handleServerItemsResponse(boost::shared_ptr<DiscoItems removeService(jid); } foreach (DiscoItems::Item item, items->getItems()) { - handleAddService(item.getJID()); + if (item.getNode().isEmpty()) { + /* Don't look at noded items. It's possible that this will exclude some services, + * but I've never seen one in the wild, and it's an easy fix for not looping. + */ + handleAddService(item.getJID()); + } } refreshView(); } |