aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/service
diff options
context:
space:
mode:
authorBoris Grozev <boris@jitsi.org>2014-10-07 11:27:31 +0300
committerBoris Grozev <boris@jitsi.org>2014-10-07 11:27:31 +0300
commitf855d99b8514c5a651862726a0da0c01817e0d48 (patch)
tree4998060687cda83aab3d78e59c4247635e309017 /src/net/java/sip/communicator/service
parentc0bed4172bcdfcb18f390efc70c3b9cd8f1302be (diff)
downloadjitsi-f855d99b8514c5a651862726a0da0c01817e0d48.zip
jitsi-f855d99b8514c5a651862726a0da0c01817e0d48.tar.gz
jitsi-f855d99b8514c5a651862726a0da0c01817e0d48.tar.bz2
Allows access to the port tracker for media type "DATA" and to the default port tracker.
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/TransportManager.java35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/media/TransportManager.java b/src/net/java/sip/communicator/service/protocol/media/TransportManager.java
index b1dea9c..7ef4c04 100644
--- a/src/net/java/sip/communicator/service/protocol/media/TransportManager.java
+++ b/src/net/java/sip/communicator/service/protocol/media/TransportManager.java
@@ -622,7 +622,8 @@ public abstract class TransportManager<U extends MediaAwareCallPeer<?, ?, ?>>
* Returns the port tracker that we are supposed to use when binding ports
* for the specified {@link MediaType}.
*
- * @param mediaType the media type that we want to obtain a locator for.
+ * @param mediaType the media type that we want to obtain the port tracker
+ * for. Use <tt>null</tt> to obtain the default port tracker.
*
* @return the port tracker that we are supposed to use when binding ports
* for the specified {@link MediaType}.
@@ -632,18 +633,26 @@ public abstract class TransportManager<U extends MediaAwareCallPeer<?, ?, ?>>
//make sure our port numbers reflect the configuration service settings
initializePortNumbers();
- switch (mediaType)
+ if (mediaType != null)
{
- case AUDIO:
- if (audioPortTracker != null)
- return audioPortTracker;
- else
- break;
- case VIDEO:
- if (videoPortTracker != null)
- return videoPortTracker;
- else
- break;
+ switch (mediaType)
+ {
+ case AUDIO:
+ if (audioPortTracker != null)
+ return audioPortTracker;
+ else
+ break;
+ case VIDEO:
+ if (videoPortTracker != null)
+ return videoPortTracker;
+ else
+ break;
+ case DATA:
+ if (dataPortTracker != null)
+ return dataPortTracker;
+ else
+ break;
+ }
}
return defaultPortTracker;
@@ -656,7 +665,7 @@ public abstract class TransportManager<U extends MediaAwareCallPeer<?, ?, ?>>
* port tracker.
*
* @param mediaTypeStr the name of the media type that we want to obtain a
- * locator for.
+ * port tracker for.
*
* @return the port tracker that we are supposed to use when binding ports
* for the {@link MediaType} with the specified name or the default tracker