decline request of an unknown file
This commit is contained in:
parent
b20e054d55
commit
d8978f7a08
|
@ -190,12 +190,12 @@ class JingleContent(object):
|
||||||
self.file_props.hash_:
|
self.file_props.hash_:
|
||||||
h = self._calcHash()
|
h = self._calcHash()
|
||||||
file_tag.addChild(node=h)
|
file_tag.addChild(node=h)
|
||||||
file_info = {'name' : self.file_props.name,
|
file_info = {'name' : self.file_props.name,
|
||||||
'hash' : self.file_props.hash_,
|
'hash' : self.file_props.hash_,
|
||||||
'size' : self.file_props.size,
|
'size' : self.file_props.size,
|
||||||
'date' : self.file_props.date
|
'date' : self.file_props.date
|
||||||
}
|
}
|
||||||
self.session.connection.set_files_info(file_info)
|
self.session.connection.set_files_info(file_info)
|
||||||
desc = file_tag.setTag('desc')
|
desc = file_tag.setTag('desc')
|
||||||
if self.file_props.desc:
|
if self.file_props.desc:
|
||||||
desc.setData(self.file_props.desc)
|
desc.setData(self.file_props.desc)
|
||||||
|
@ -214,3 +214,5 @@ class JingleContent(object):
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
self.callbacks = None
|
self.callbacks = None
|
||||||
del self.session.contents[(self.creator, self.name)]
|
del self.session.contents[(self.creator, self.name)]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -527,6 +527,7 @@ class JingleSession(object):
|
||||||
log.warning('The peer ' + self.peerjid + \
|
log.warning('The peer ' + self.peerjid + \
|
||||||
' is requesting a ' + \
|
' is requesting a ' + \
|
||||||
'file that we dont have')
|
'file that we dont have')
|
||||||
|
self.decline_session()
|
||||||
# If there's no content we understand...
|
# If there's no content we understand...
|
||||||
if not contents:
|
if not contents:
|
||||||
# TODO: http://xmpp.org/extensions/xep-0166.html#session-terminate
|
# TODO: http://xmpp.org/extensions/xep-0166.html#session-terminate
|
||||||
|
|
Loading…
Reference in New Issue