get file_tag from file request

This commit is contained in:
Jefry Lagrange 2012-08-23 23:16:25 -04:00
parent 6120c81a78
commit e025d54fb1
1 changed files with 5 additions and 2 deletions

View File

@ -2006,8 +2006,11 @@ class FileRequestReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
if self.jingle_content:
self.file_props.session_type = 'jingle'
self.file_props.stream_methods = xmpp.NS_BYTESTREAM
file_tag = self.jingle_content.getTag('description').getTag(
'offer').getTag('file')
desc = self.jingle_content.getTag('description')
if desc.getTag('offer'):
file_tag = desc.getTag('offer').getTag('file')
else:
file_tag = desc.getTag('request').getTag('file')
for child in file_tag.getChildren():
name = child.getName()
val = child.getData()