diff options
author | Sebastien Vincent <seb@jitsi.org> | 2010-12-20 16:57:25 +0000 |
---|---|---|
committer | Sebastien Vincent <seb@jitsi.org> | 2010-12-20 16:57:25 +0000 |
commit | 0082a836f4473934aa6d051da90e29ed5c1710ea (patch) | |
tree | 0ede71528089216d5637fcbabfc6669f7c9185e8 /src/net/java/sip | |
parent | 6713576cbdd392572e8506cee300f3c429896952 (diff) | |
download | jitsi-0082a836f4473934aa6d051da90e29ed5c1710ea.zip jitsi-0082a836f4473934aa6d051da90e29ed5c1710ea.tar.gz jitsi-0082a836f4473934aa6d051da90e29ed5c1710ea.tar.bz2 |
Enable Jingle Nodes by default.
Diffstat (limited to 'src/net/java/sip')
6 files changed, 19 insertions, 18 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java b/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java index 1760a12..e617026 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java @@ -196,12 +196,15 @@ public class IceUdpTransportManager SmackServiceNode serviceNode = peer.getProtocolProvider().getJingleNodesServiceNode(); - JingleNodesHarvester harvester = new JingleNodesHarvester( - serviceNode); - - if(harvester != null) + if(serviceNode != null) { - agent.addCandidateHarvester(harvester); + JingleNodesHarvester harvester = new JingleNodesHarvester( + serviceNode); + + if(harvester != null) + { + agent.addCandidateHarvester(harvester); + } } } diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/JabberAccountID.java b/src/net/java/sip/communicator/impl/protocol/jabber/JabberAccountID.java index 788231c..b36bbf5 100755 --- a/src/net/java/sip/communicator/impl/protocol/jabber/JabberAccountID.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/JabberAccountID.java @@ -153,7 +153,7 @@ public class JabberAccountID { return getAccountPropertyBoolean( ProtocolProviderFactory.AUTO_DISCOVER_JINGLE_NODES, - false); + true); } /** @@ -167,6 +167,6 @@ public class JabberAccountID { return getAccountPropertyBoolean( ProtocolProviderFactory.IS_USE_JINGLE_NODES, - false); + true); } } diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java b/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java index 6d439e9..33d93d8 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java @@ -97,6 +97,7 @@ public class JingleNodesCandidate * @return the <tt>DatagramSocket</tt> associated with this * <tt>Candidate</tt> */ + @Override public DatagramSocket getSocket() { if (socket == null) diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java index 62ea89f..6d0d8c5 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java @@ -1823,7 +1823,7 @@ public class ProtocolProviderServiceJabberImpl { // Jingle Nodes Service Initialization JabberAccountID accID = (JabberAccountID)getAccountID(); - jingleNodesServiceNode = new SmackServiceNode(connection, 60000); + final SmackServiceNode service = new SmackServiceNode(connection, 60000); for(JingleNodeDescriptor desc : accID.getJingleNodes()) { @@ -1834,10 +1834,9 @@ public class ProtocolProviderServiceJabberImpl desc.getJID(), JingleChannelIQ.UDP); - jingleNodesServiceNode.addTrackerEntry(entry); + service.addTrackerEntry(entry); } - final SmackServiceNode service = jingleNodesServiceNode; final boolean autoDiscover = accID.isJingleNodesAutoDiscoveryEnabled(); new Thread() @@ -1862,6 +1861,7 @@ public class ProtocolProviderServiceJabberImpl } service.addEntries(nodes); + jingleNodesServiceNode = service; } } }.start(); @@ -1875,10 +1875,7 @@ public class ProtocolProviderServiceJabberImpl */ public SmackServiceNode getJingleNodesServiceNode() { - synchronized(jingleNodesSyncRoot) - { - return jingleNodesServiceNode; - } + return jingleNodesServiceNode; } /** diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java index 6fb9fe0..5372160 100644 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java @@ -334,7 +334,7 @@ public class FirstWizardPage String useJN = accountProperties.get(ProtocolProviderFactory.IS_USE_JINGLE_NODES); boolean isUseJN = Boolean.parseBoolean( - (useJN != null && useJN.length() != 0) ? useJN : "false"); + (useJN != null && useJN.length() != 0) ? useJN : "true"); iceConfigPanel.setUseJingleNodes(isUseJN); @@ -344,7 +344,7 @@ public class FirstWizardPage boolean isUseAutoDiscoverJN = Boolean.parseBoolean( (useAutoDiscoverJN != null && useAutoDiscoverJN.length() != 0) ? - useAutoDiscoverJN : "false"); + useAutoDiscoverJN : "true"); iceConfigPanel.setAutoDiscoverJingleNodes(isUseAutoDiscoverJN); diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/IceConfigPanel.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/IceConfigPanel.java index 7986569..8c4852b 100644 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/IceConfigPanel.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/IceConfigPanel.java @@ -107,8 +107,8 @@ public class IceConfigPanel autoDiscoverBox.setSelected(true); defaultStunBox.setSelected(true); - //jnBox.setSelected(true); - //jnAutoDiscoverBox.setSelected(true); + jnBox.setSelected(true); + jnAutoDiscoverBox.setSelected(true); JPanel checkBoxPanel = new TransparentPanel(new GridLayout(0, 1)); checkBoxPanel.add(iceBox); |