changeset fafb66348f1d in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=fafb66348f1d description: fix candidate-error
diffstat:
src/common/jingle_content.py | 2 +- src/common/jingle_transport.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r 36de9201a8c7 -r fafb66348f1d src/common/jingle_content.py --- a/src/common/jingle_content.py Fri Jul 22 17:03:56 2011 -0400 +++ b/src/common/jingle_content.py Fri Jul 22 18:00:29 2011 -0400 @@ -145,7 +145,7 @@ 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) diff -r 36de9201a8c7 -r fafb66348f1d src/common/jingle_transport.py --- a/src/common/jingle_transport.py Fri Jul 22 17:03:56 2011 -0400 +++ b/src/common/jingle_transport.py Fri Jul 22 18:00:29 2011 -0400 @@ -117,11 +117,14 @@
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