Update dns servers on all iface up events, with ipv6 configurations in some cases we can end up without primary dns server.

Remove duplicate dns library.
Fix searching in history using regexp symbols.
cusax-fix
Damian Minkov 15 years ago
parent 10c75adf54
commit fb072bcbe7

@ -1035,7 +1035,7 @@
manifest="${src}/net/java/sip/communicator/util/util.manifest.mf"> manifest="${src}/net/java/sip/communicator/util/util.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/util" <zipfileset dir="${dest}/net/java/sip/communicator/util"
prefix="net/java/sip/communicator/util"/> prefix="net/java/sip/communicator/util"/>
<zipfileset src="${lib.noinst}/dnsjava-2.0.3.jar" prefix=""/> <zipfileset src="${lib.noinst}/dnsjava.jar" prefix=""/>
<zipfileset src="lib/installer-exclude/laf-widget.jar" prefix=""/> <zipfileset src="lib/installer-exclude/laf-widget.jar" prefix=""/>
</jar> </jar>
</target> </target>

@ -7,6 +7,7 @@
package net.java.sip.communicator.impl.history; package net.java.sip.communicator.impl.history;
import java.util.*; import java.util.*;
import java.util.regex.*;
import org.w3c.dom.*; import org.w3c.dom.*;
@ -689,7 +690,8 @@ static boolean matchKeyword(String value, String[] keywords,
for (int i = 0; i < keywords.length; i++) for (int i = 0; i < keywords.length; i++)
{ {
if(!value.matches(regexpStart + keywords[i] + REGEXP_END)) if(!value.matches(
regexpStart + Pattern.quote(keywords[i]) + REGEXP_END))
return false; return false;
} }

@ -1106,11 +1106,6 @@ private static Lookup createLookup(String domain, int type)
private static class NetworkListener private static class NetworkListener
implements NetworkConfigurationChangeListener implements NetworkConfigurationChangeListener
{ {
/**
* The last network change we have received.
*/
private int lastChange = -1;
/** /**
* Fired when a change has occurred in the * Fired when a change has occurred in the
* computer network configuration. * computer network configuration.
@ -1119,13 +1114,10 @@ private static class NetworkListener
*/ */
public void configurationChanged(ChangeEvent event) public void configurationChanged(ChangeEvent event)
{ {
if(lastChange == ChangeEvent.IFACE_DOWN if(event.getType() == ChangeEvent.IFACE_UP)
&& event.getType() == ChangeEvent.IFACE_UP)
{ {
reloadDnsResolverConfig(); reloadDnsResolverConfig();
} }
lastChange = event.getType();
} }
} }

Loading…
Cancel
Save