Respects the IPv6 configuration in SinglePortUdpHarvester. Fixes typos.
This commit is contained in:
parent
f9ee7aedba
commit
4cb51d0302
@ -78,6 +78,10 @@ public class SinglePortUdpHarvester
|
|||||||
|
|
||||||
List<TransportAddress> addresses = new LinkedList<TransportAddress>();
|
List<TransportAddress> addresses = new LinkedList<TransportAddress>();
|
||||||
|
|
||||||
|
boolean isIPv6Disabled = StackProperties.getBoolean(
|
||||||
|
StackProperties.DISABLE_IPv6,
|
||||||
|
false);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for (NetworkInterface iface
|
for (NetworkInterface iface
|
||||||
@ -96,6 +100,9 @@ public class SinglePortUdpHarvester
|
|||||||
{
|
{
|
||||||
InetAddress address = ifaceAddresses.nextElement();
|
InetAddress address = ifaceAddresses.nextElement();
|
||||||
|
|
||||||
|
if (isIPv6Disabled && address instanceof Inet6Address)
|
||||||
|
continue;
|
||||||
|
|
||||||
addresses.add(
|
addresses.add(
|
||||||
new TransportAddress(address, port, Transport.UDP));
|
new TransportAddress(address, port, Transport.UDP));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -136,7 +136,7 @@ public class EventDispatcher
|
|||||||
* Add a RequestListener to the listener list. The listener is registered
|
* Add a RequestListener to the listener list. The listener is registered
|
||||||
* for requests coming from no matter which NetAccessPoint.
|
* for requests coming from no matter which NetAccessPoint.
|
||||||
*
|
*
|
||||||
* @param listener The ReuqestListener to be added
|
* @param listener The RequestListener to be added
|
||||||
*/
|
*/
|
||||||
public void addRequestListener(RequestListener listener)
|
public void addRequestListener(RequestListener listener)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -789,7 +789,7 @@ public class StunStack
|
|||||||
* Sets the listener that should be notified when a new Request is received.
|
* Sets the listener that should be notified when a new Request is received.
|
||||||
* @param requestListener the listener interested in incoming requests.
|
* @param requestListener the listener interested in incoming requests.
|
||||||
*/
|
*/
|
||||||
public void addRequestListener(RequestListener requestListener)
|
public void addRequestListener(RequestListener requestListener)
|
||||||
{
|
{
|
||||||
this.eventDispatcher.addRequestListener( requestListener );
|
this.eventDispatcher.addRequestListener( requestListener );
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user