fix candidate-error

This commit is contained in:
Jefry Lagrange 2011-07-22 18:00:29 -04:00
parent 11f1c8c275
commit 6402505983
2 changed files with 9 additions and 6 deletions

View File

@ -145,7 +145,7 @@ class JingleContent(object):
Sends a candidate-error when we can't connect to a candidate.
"""
content = self.__content()
tp = self.transport.make_transport()
tp = self.transport.make_transport(add_candidates=False)
tp.addChild(name='candidate-error')
content.addChild(node=tp)
self.session.send_transport_info(content)

View File

@ -117,11 +117,14 @@ class JingleTransportSocks5(JingleTransport):
return xmpp.Node('candidate', attrs=attrs)
def make_transport(self, candidates=None):
self._add_local_ips_as_candidates()
self._add_additional_candidates()
self._add_proxy_candidates()
transport = JingleTransport.make_transport(self, candidates)
def make_transport(self, candidates=None, add_candidates = True):
if add_candidates:
self._add_local_ips_as_candidates()
self._add_additional_candidates()
self._add_proxy_candidates()
transport = JingleTransport.make_transport(self, candidates)
else:
transport = xmpp.Node('transport')
transport.setNamespace(xmpp.NS_JINGLE_BYTESTREAM)
transport.setAttr('sid', self.sid)
return transport