summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-04-10 10:58:43 +0200
committerArne Schwabe <arne@rfc2549.org>2013-04-10 10:58:43 +0200
commite481245959d63c9aa23c562cae6dbc5aea5eb307 (patch)
treeabff6bcbc9a210dd8a902db00588315c215b3c62 /src
parent33efe31b7b403672e8e0e21ba090bb9bf0afcba0 (diff)
Always log tun information
I tired of bug reports without this information. Also this removes one of the unclear buttons in the Logwindow
Diffstat (limited to 'src')
-rw-r--r--src/de/blinkt/openvpn/LogWindow.java5
-rw-r--r--src/de/blinkt/openvpn/core/OpenVPN.java15
-rw-r--r--src/de/blinkt/openvpn/core/OpenVpnService.java21
3 files changed, 8 insertions, 33 deletions
diff --git a/src/de/blinkt/openvpn/LogWindow.java b/src/de/blinkt/openvpn/LogWindow.java
index 5077da4b..5c78f2f6 100644
--- a/src/de/blinkt/openvpn/LogWindow.java
+++ b/src/de/blinkt/openvpn/LogWindow.java
@@ -46,7 +46,6 @@ import de.blinkt.openvpn.core.ProfileManager;
public class LogWindow extends ListActivity implements StateListener {
private static final String LOGTIMEFORMAT = "logtimeformat";
private static final int START_VPN_CONFIG = 0;
- private String[] mBconfig=null;
protected OpenVpnService mService;
private ServiceConnection mConnection = new ServiceConnection() {
@@ -283,10 +282,6 @@ public class LogWindow extends ListActivity implements StateListener {
builder.show();
return true;
- } else if(item.getItemId()==R.id.info) {
- if(mBconfig==null)
- OpenVPN.triggerLogBuilderConfig();
-
} else if(item.getItemId()==R.id.send) {
ladapter.shareLog();
} else if(item.getItemId()==R.id.edit_vpn) {
diff --git a/src/de/blinkt/openvpn/core/OpenVPN.java b/src/de/blinkt/openvpn/core/OpenVPN.java
index aba3ef0c..2bc4cf6b 100644
--- a/src/de/blinkt/openvpn/core/OpenVPN.java
+++ b/src/de/blinkt/openvpn/core/OpenVPN.java
@@ -31,8 +31,6 @@ public class OpenVPN {
private static Vector<StateListener> stateListener;
private static Vector<ByteCountListener> byteCountListener;
- private static String[] mBconfig;
-
private static String mLaststatemsg="";
private static String mLaststate = "NOPROCESS";
@@ -347,19 +345,6 @@ public class OpenVPN {
return (LogItem[]) logbuffer.toArray(new LogItem[logbuffer.size()]);
}
- public static void logBuilderConfig(String[] bconfig) {
- mBconfig = bconfig;
- }
- public static void triggerLogBuilderConfig() {
- if(mBconfig==null) {
- logMessage(0, "", "No active interface");
- } else {
- for (String item : mBconfig) {
- logMessage(0, "", item);
- }
- }
-
- }
public static void updateStateString (String state, String msg) {
int rid = getLocalizedState(state);
diff --git a/src/de/blinkt/openvpn/core/OpenVpnService.java b/src/de/blinkt/openvpn/core/OpenVpnService.java
index 1b25c28a..4dba80f1 100644
--- a/src/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/src/de/blinkt/openvpn/core/OpenVpnService.java
@@ -104,7 +104,6 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
private void endVpnService() {
mProcessThread=null;
- OpenVPN.logBuilderConfig(null);
OpenVPN.removeByteCountListener(this);
unregisterNetworkStateReceiver();
ProfileManager.setConntectedVpnProfileDisconnected(this);
@@ -268,7 +267,9 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
mProfile = ProfileManager.get(profileUUID);
- showNotification("Starting VPN " + mProfile.mName,"Starting VPN " + mProfile.mName,
+ String startTitle = getString(R.string.start_vpn_title, mProfile.mName);
+ String startTicker = getString(R.string.start_vpn_ticker, mProfile.mName);
+ showNotification(startTitle, startTicker,
false,0,ConnectionStatus.LEVEL_CONNECTING_NO_SERVER_REPLY_YET);
// Set a flag that we are starting a new VPN
@@ -407,14 +408,11 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
if(mDomain!=null)
builder.addSearchDomain(mDomain);
- String bconfig[] = new String[6];
-
- bconfig[0]= getString(R.string.last_openvpn_tun_config);
- bconfig[1] = getString(R.string.local_ip_info,mLocalIP.mIp,mLocalIP.len,mLocalIPv6, mMtu);
- bconfig[2] = getString(R.string.dns_server_info, joinString(mDnslist));
- bconfig[3] = getString(R.string.dns_domain_info, mDomain);
- bconfig[4] = getString(R.string.routes_info, joinString(mRoutes));
- bconfig[5] = getString(R.string.routes_info6, joinString(mRoutesv6));
+ OpenVPN.logInfo(R.string.last_openvpn_tun_config);
+ OpenVPN.logInfo(R.string.local_ip_info,mLocalIP.mIp,mLocalIP.len,mLocalIPv6, mMtu);
+ OpenVPN.logInfo(R.string.dns_server_info, joinString(mDnslist), mDomain);
+ OpenVPN.logInfo(R.string.routes_info, joinString(mRoutes));
+ OpenVPN.logInfo(R.string.routes_info6, joinString(mRoutesv6));
String session = mProfile.mName;
if(mLocalIP!=null && mLocalIPv6!=null)
@@ -424,9 +422,6 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
builder.setSession(session);
-
- OpenVPN.logBuilderConfig(bconfig);
-
// No DNS Server, log a warning
if(mDnslist.size()==0)
OpenVPN.logInfo(R.string.warn_no_dns);