aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/service
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2012-06-11 18:48:50 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2012-06-11 18:48:50 +0000
commit65c6c97ee2f96f3003567199627fad3ed520f3d7 (patch)
treee7f34080063dd24ba550bec77f517f9fa374acd8 /src/net/java/sip/communicator/service
parentda9780acee344e22c681ce4d17adc119c7c7a68e (diff)
downloadjitsi-65c6c97ee2f96f3003567199627fad3ed520f3d7.zip
jitsi-65c6c97ee2f96f3003567199627fad3ed520f3d7.tar.gz
jitsi-65c6c97ee2f96f3003567199627fad3ed520f3d7.tar.bz2
Commits work in progress on libjitsi.
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r--src/net/java/sip/communicator/service/neomedia/DefaultStreamConnector.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/net/java/sip/communicator/service/neomedia/DefaultStreamConnector.java b/src/net/java/sip/communicator/service/neomedia/DefaultStreamConnector.java
index affa87b..fc7096d 100644
--- a/src/net/java/sip/communicator/service/neomedia/DefaultStreamConnector.java
+++ b/src/net/java/sip/communicator/service/neomedia/DefaultStreamConnector.java
@@ -119,18 +119,29 @@ public class DefaultStreamConnector
private static synchronized DatagramSocket createDatagramSocket(
InetAddress bindAddr)
{
- ConfigurationService config
- = NeomediaActivator.getConfigurationService();
- int bindRetries
- = config
- .getInt(BIND_RETRIES_PROPERTY_NAME, BIND_RETRIES_DEFAULT_VALUE);
+ ConfigurationService cfg = NeomediaActivator.getConfigurationService();
+ int bindRetries = BIND_RETRIES_DEFAULT_VALUE;
+
+ if (cfg != null)
+ bindRetries = cfg.getInt(BIND_RETRIES_PROPERTY_NAME, bindRetries);
if (maxPort < 0)
- maxPort = config.getInt(MAX_PORT_NUMBER_PROPERTY_NAME, 6000);
+ {
+ maxPort = 6000;
+ if (cfg != null)
+ maxPort = cfg.getInt(MAX_PORT_NUMBER_PROPERTY_NAME, maxPort);
+ }
for (int i = 0; i < bindRetries; i++)
{
if ((minPort < 0) || (minPort > maxPort))
- minPort = config.getInt(MIN_PORT_NUMBER_PROPERTY_NAME, 5000);
+ {
+ minPort = 5000;
+ if (cfg != null)
+ {
+ minPort
+ = cfg.getInt(MIN_PORT_NUMBER_PROPERTY_NAME, minPort);
+ }
+ }
int port = minPort++;