stop infinite recursion in group search #1152
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
along the search, sone tokens appear as their own item so falling in a infinite loop. So I created a array that keep track the items already done.
For example for server "jabber.univ-lille2.fr", I get 13 items and 8 times "jabber.univ-lille2.fr" :
<query xmlns='http://jabber.org/protocol/disco#items'><item jid='conference.jabber.univ-lille2.fr'/><item jid='proxy.jabber.univ-lille2.fr'/><item jid='pubsub.jabber.univ-lille2.fr'/><item jid='vjud.jabber.univ-lille2.fr'/><item jid='webpresence.jabber.univ-lille2.fr'/><item jid='jabber.univ-lille2.fr' node='announce' name='Annonces'/><item jid='jabber.univ-lille2.fr' name='Configuration' node='config'/><item jid='jabber.univ-lille2.fr' name='Gestion des utilisateurs' node='user'/><item jid='jabber.univ-lille2.fr' name='Utilisateurs en ligne' node='online users'/><item jid='jabber.univ-lille2.fr' name='Tous les utilisateurs' node='all users'/><item jid='jabber.univ-lille2.fr' name='Connexions s2s sortantes' node='outgoing s2s'/><item jid='jabber.univ-lille2.fr' name='Noeuds actifs' node='running nodes'/><item jid='jabber.univ-lille2.fr' name='Noeuds arrêtés' node='stopped nodes'/></query>