comparison src/plugins/plugin_xep_0047.py @ 403:c513328ade9d

plugins XEP-0047 and XEP-0065: timout bug fix
author Goffi <goffi@goffi.org>
date Fri, 07 Oct 2011 12:09:48 +0200
parents 8f3551ceee17
children 6a1c6c41b91b
comparison
equal deleted inserted replaced
402:f03688bdb858 403:c513328ade9d
294 if iq_elt["type"] == "error": 294 if iq_elt["type"] == "error":
295 warning(_("Transfer failed")) 295 warning(_("Transfer failed"))
296 self.terminateStream(sid, "IQ_ERROR") 296 self.terminateStream(sid, "IQ_ERROR")
297 return 297 return
298 298
299 if data['timer'].active():
300 data['timer'].cancel()
301
299 buffer = data["file_obj"].read(data["block_size"]) 302 buffer = data["file_obj"].read(data["block_size"])
300 if buffer: 303 if buffer:
301 next_iq_elt = client.IQ(data["xmlstream"],'set') 304 next_iq_elt = client.IQ(data["xmlstream"],'set')
302 next_iq_elt['to'] = data["to"].full() 305 next_iq_elt['to'] = data["to"].full()
303 data_elt = next_iq_elt.addElement('data', NS_IBB) 306 data_elt = next_iq_elt.addElement('data', NS_IBB)