From 69f36a1ffafafc233291f44af0b7146428b764a3 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 3 May 2012 11:05:51 +0200 Subject: extract settings string to ressource file. Fix calucation of netmaks Make p2p assumption message clearer closes issue #5 --- src/de/blinkt/openvpn/ShowConfigFragment.java | 1 - src/de/blinkt/openvpn/VPNProfileList.java | 2 +- src/de/blinkt/openvpn/VpnProfile.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/de/blinkt/openvpn/ShowConfigFragment.java b/src/de/blinkt/openvpn/ShowConfigFragment.java index 68898e07..13c65df8 100644 --- a/src/de/blinkt/openvpn/ShowConfigFragment.java +++ b/src/de/blinkt/openvpn/ShowConfigFragment.java @@ -22,7 +22,6 @@ public class ShowConfigFragment extends Fragment { } else { String cfg=vp.getConfigFile(getActivity().getCacheDir()); - cv.setText(cfg); } return v; diff --git a/src/de/blinkt/openvpn/VPNProfileList.java b/src/de/blinkt/openvpn/VPNProfileList.java index 42c881a8..58c9237a 100644 --- a/src/de/blinkt/openvpn/VPNProfileList.java +++ b/src/de/blinkt/openvpn/VPNProfileList.java @@ -31,7 +31,7 @@ public class VPNProfileList extends PreferenceFragment implements VpnPreference setHasOptionsMenu(true); refreshList(); // Debug load JNI - OpenVPN.foo(); + //OpenVPN.foo(); } diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 04b5927f..683ba663 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -376,7 +376,7 @@ public class VpnProfile implements Serializable{ long nm = 0xffffffffl; - nm = (nm << len) & 0xffffffffl; + nm = (nm << (32-len)) & 0xffffffffl; String netmask =String.format("%d.%d.%d.%d", (nm & 0xff000000) >> 24,(nm & 0xff0000) >> 16, (nm & 0xff00) >> 8 ,nm & 0xff ); return parts[0] + " " + netmask; -- cgit v1.2.3