decline request of an unknown file

This commit is contained in:
Jefry Lagrange 2012-08-29 20:31:27 -04:00
parent b20e054d55
commit d8978f7a08
2 changed files with 9 additions and 6 deletions

View File

@ -190,12 +190,12 @@ class JingleContent(object):
self.file_props.hash_:
h = self._calcHash()
file_tag.addChild(node=h)
file_info = {'name' : self.file_props.name,
'hash' : self.file_props.hash_,
'size' : self.file_props.size,
'date' : self.file_props.date
}
self.session.connection.set_files_info(file_info)
file_info = {'name' : self.file_props.name,
'hash' : self.file_props.hash_,
'size' : self.file_props.size,
'date' : self.file_props.date
}
self.session.connection.set_files_info(file_info)
desc = file_tag.setTag('desc')
if self.file_props.desc:
desc.setData(self.file_props.desc)
@ -214,3 +214,5 @@ class JingleContent(object):
def destroy(self):
self.callbacks = None
del self.session.contents[(self.creator, self.name)]

View File

@ -527,6 +527,7 @@ class JingleSession(object):
log.warning('The peer ' + self.peerjid + \
' is requesting a ' + \
'file that we dont have')
self.decline_session()
# If there's no content we understand...
if not contents:
# TODO: http://xmpp.org/extensions/xep-0166.html#session-terminate