From f0bc455648301570d4897b1342146e406af28dd9 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sun, 15 Jul 2012 17:01:33 +0200 Subject: Add warning if no dns is set. Check in a working copy of jbcrypto --- src/de/blinkt/openvpn/OpenVpnService.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java index c50196b8..102e5d59 100644 --- a/src/de/blinkt/openvpn/OpenVpnService.java +++ b/src/de/blinkt/openvpn/OpenVpnService.java @@ -241,7 +241,8 @@ public class OpenVpnService extends VpnService implements StateListener { for (String dns : mDnslist ) { builder.addDnsServer(dns); } - + + builder.setMtu(mMtu); @@ -283,7 +284,11 @@ public class OpenVpnService extends VpnService implements StateListener { OpenVPN.logBuilderConfig(bconfig); - + + // No DNS Server, log a warning + if(mDnslist.size()==0) + OpenVPN.logInfo(R.string.warn_no_dns); + // Reset information mDnslist.clear(); mRoutes.clear(); @@ -393,10 +398,10 @@ public class OpenVpnService extends VpnService implements StateListener { } // Skip exiting status if the status is already hidden - if("EXITING SIGINT".equals(state) && !mNotificationvisible) { + if(("EXITING SIGINT".equals(state) || "EXITING".equals(state)) + && !mNotificationvisible) { return; - } - + } if("BYTECOUNT".equals(state)) { if(mDisplayBytecount) { -- cgit v1.2.3