// we expect the getString to return either null or a
// non-empty String object.
private void startIce4j(BundleContext bundleContext, ConfigurationService cfg) {
		// TODO Packet logging for ice4j is not supported at this time.
		StunStack.setPacketLogger(null);
		// Make all ice4j properties system properties.
		if (cfg != null) {
			List<String> ice4jPropertyNames = cfg.getPropertyNamesByPrefix("org.ice4j.", false);
			if (ice4jPropertyNames != null && !ice4jPropertyNames.isEmpty()) {
				for (String propertyName : ice4jPropertyNames) {
					String propertyValue = cfg.getString(propertyName);
					// we expect the getString to return either null or a
					// non-empty String object.
					if (propertyValue != null)
						System.setProperty(propertyName, propertyValue);
				}
			}
			// These properties are moved to ice4j. This is to make sure that we
			// still support the old names.
			String oldPrefix = "org.jitsi.videobridge";
			String newPrefix = "org.ice4j.ice.harvest";
			for (String propertyName : new String[] { HarvesterConfiguration.NAT_HARVESTER_LOCAL_ADDRESS,
					HarvesterConfiguration.NAT_HARVESTER_PUBLIC_ADDRESS, HarvesterConfiguration.DISABLE_AWS_HARVESTER,
					HarvesterConfiguration.FORCE_AWS_HARVESTER,
					HarvesterConfiguration.STUN_MAPPING_HARVESTER_ADDRESSES }) {
				String propertyValue = cfg.getString(propertyName);
				if (propertyValue != null) {
					String newPropertyName = newPrefix + propertyName.substring(oldPrefix.length());
					System.setProperty(newPropertyName, propertyValue);
				}
			}
			String enableLipSync = cfg.getString(Endpoint.ENABLE_LIPSYNC_HACK_PNAME);
			if (enableLipSync != null) {
				System.setProperty(VideoChannel.ENABLE_LIPSYNC_HACK_PNAME, enableLipSync);
			}
			String disableNackTerminaton = cfg.getString(VideoChannel.DISABLE_NACK_TERMINATION_PNAME);
			if (disableNackTerminaton != null) {
				System.setProperty(RtxTransformer.DISABLE_NACK_TERMINATION_PNAME, disableNackTerminaton);
			}
		}
		// Initialize the the host candidate interface filters in the ice4j
		// stack.
		try {
			HostCandidateHarvester.initializeInterfaceFilters();
		} catch (Exception e) {
			logger.warn("There were errors during host candidate interface filters" + " initialization.", e);
		}
		// Start the initialization of the mapping candidate harvesters.
		// Asynchronous, because the AWS and STUN harvester may take a long
		// time to initialize.
		new Thread(MappingCandidateHarvesters::initialize).start();
	}
for (String propertyName : ice4jPropertyNames) {
String propertyValue = cfg.getString(propertyName);
// we expect the getString to return either null or a
// non-empty String object.
if (propertyValue != null)
System.setProperty(propertyName, propertyValue);
private void startIce4j(BundleContext bundleContext, ConfigurationService cfg) {
// TODO Packet logging for ice4j is not supported at this time.
StunStack.setPacketLogger(null);
// Make all ice4j properties system properties.
if (cfg != null) {
List<String> ice4jPropertyNames = cfg.getPropertyNamesByPrefix("org.ice4j.", false);
if (ice4jPropertyNames != null && !ice4jPropertyNames.isEmpty()) {
for (String propertyName : ice4jPropertyNames) {
String propertyValue = cfg.getString(propertyName);
// we expect the getString to return either null or a
// non-empty String object.
if (propertyValue != null)
System.setProperty(propertyName, propertyValue);
}
}
// These properties are moved to ice4j. This is to make sure that we
// still support the old names.
String oldPrefix = "org.jitsi.videobridge";
String newPrefix = "org.ice4j.ice.harvest";
for (String propertyName : new String[] { HarvesterConfiguration.NAT_HARVESTER_LOCAL_ADDRESS,
HarvesterConfiguration.NAT_HARVESTER_PUBLIC_ADDRESS, HarvesterConfiguration.DISABLE_AWS_HARVESTER,
private void startIce4j(BundleContext bundleContext, ConfigurationService cfg) {
// TODO Packet logging for ice4j is not supported at this time.
StunStack.setPacketLogger(null);
// Make all ice4j properties system properties.
if (cfg != null) {
List<String> ice4jPropertyNames = cfg.getPropertyNamesByPrefix("org.ice4j.", false);
if (ice4jPropertyNames != null && !ice4jPropertyNames.isEmpty()) {
for (String propertyName : ice4jPropertyNames) {
String propertyValue = cfg.getString(propertyName);
// we expect the getString to return either null or a
// non-empty String object.
if (propertyValue != null)
System.setProperty(propertyName, propertyValue);
}
}
// These properties are moved to ice4j. This is to make sure that we
// still support the old names.
String oldPrefix = "org.jitsi.videobridge";
String newPrefix = "org.ice4j.ice.harvest";
for (String propertyName : new String[] { HarvesterConfiguration.NAT_HARVESTER_LOCAL_ADDRESS,
HarvesterConfiguration.NAT_HARVESTER_PUBLIC_ADDRESS, HarvesterConfiguration.DISABLE_AWS_HARVESTER,
HarvesterConfiguration.FORCE_AWS_HARVESTER,
HarvesterConfiguration.STUN_MAPPING_HARVESTER_ADDRESSES }) {
String propertyValue = cfg.getString(propertyName);
if (propertyValue != null) {
String newPropertyName = newPrefix + propertyName.substring(oldPrefix.length());
System.setProperty(newPropertyName, propertyValue);
}
}
String enableLipSync = cfg.getString(Endpoint.ENABLE_LIPSYNC_HACK_PNAME);
if (enableLipSync != null) {