Avoid infinite loop on version result

We need to check if type="get". otherwise we will send our version
when we will receive the version of the remote entity, and thus
going in an infinite loop.
This commit is contained in:
Florent Le Coz 2011-03-16 06:28:12 +08:00 committed by Lance Stout
parent 45ccb31356
commit 5635265203

View file

@ -42,7 +42,7 @@ class xep_0092(base_plugin):
self.xmpp.register_handler( self.xmpp.register_handler(
Callback('Software Version', Callback('Software Version',
StanzaPath('iq/software_version'), StanzaPath('iq@=get/software_version'),
self._handle_version)) self._handle_version))
register_stanza_plugin(Iq, Version) register_stanza_plugin(Iq, Version)