diff src/plugins/plugin_xep_0095.py @ 398:cb0285372818

File transfer: - proxy managed in XEP-0065 (Socks5 bytestream) - bug: fixed a bad id used during stream negociation
author Goffi <goffi@goffi.org>
date Wed, 05 Oct 2011 16:49:57 +0200
parents 8f3551ceee17
children cf005701624b
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0095.py	Wed Oct 05 16:48:25 2011 +0200
+++ b/src/plugins/plugin_xep_0095.py	Wed Oct 05 16:49:57 2011 +0200
@@ -75,13 +75,13 @@
         info (_("XEP-0095 Stream initiation"))
         iq_el.handled=True
         si_el = iq_el.firstChildElement()
-        si_id = iq_el.getAttribute('id')
+        si_id = si_el.getAttribute('id')
         si_mime_type = iq_el.getAttribute('mime-type', 'application/octet-stream')
         si_profile = si_el.getAttribute('profile')
         si_profile_key =  si_profile[len(SI_PROFILE_HEADER):] if si_profile.startswith(SI_PROFILE_HEADER) else si_profile
         if self.si_profiles.has_key(si_profile_key):
             #We know this SI profile, we call the callback
-            self.si_profiles[si_profile_key](iq_el['from'], si_id, si_mime_type, si_el, profile)
+            self.si_profiles[si_profile_key](iq_el['id'], iq_el['from'], si_id, si_mime_type, si_el, profile)
         else:
             #We don't know this profile, we send an error
             self.sendBadProfileError(iq_el['id'], iq_el['from'], profile)