summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/openvpn/src/openvpn/route.c7
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java8
3 files changed, 14 insertions, 3 deletions
diff --git a/main/openvpn/src/openvpn/route.c b/main/openvpn/src/openvpn/route.c
index 545a929b..e4224e19 100644
--- a/main/openvpn/src/openvpn/route.c
+++ b/main/openvpn/src/openvpn/route.c
@@ -109,6 +109,13 @@ new_route_ipv6_option_list (struct gc_arena *a)
return ret;
}
+/*
+ * NOTE: structs are cloned/copied shallow by design.
+ * The routes list from src will stay intact since it is allocated using
+ * the options->gc. The cloned/copied lists will share this common tail
+ * to avoid copying the data around between pulls. Pulled routes use
+ * the c2->gc so they get freed immediately after a reconnect.
+ */
struct route_option_list *
clone_route_option_list (const struct route_option_list *src, struct gc_arena *a)
{
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
index 08d28ca1..1937ffc0 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
@@ -429,7 +429,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement {
return false;
}
- ParcelFileDescriptor pfd = mOpenVPNService.openTun();
+ ParcelFileDescriptor pfd = mOpenVPNService.openTun();
if(pfd==null)
return false;
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
index 1e9e14f1..0de791d6 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
@@ -638,6 +638,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
if (mProcessThread == null && !mNotificationAlwaysVisible)
return;
+ boolean lowpriority = false;
// Display byte count only after being connected
{
@@ -648,6 +649,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
} else if (level == LEVEL_CONNECTED) {
mDisplayBytecount = true;
mConnecttime = System.currentTimeMillis();
+ lowpriority = true;
} else {
mDisplayBytecount = false;
}
@@ -655,8 +657,10 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
// Other notifications are shown,
// This also mean we are no longer connected, ignore bytecount messages until next
// CONNECTED
- String ticker = getString(resid);
- showNotification(getString(resid) + " " + logmessage, ticker, false, 0, level);
+ // Does not work :(
+ String msg = getString(resid);
+ String ticker = msg;
+ showNotification(msg + " " + logmessage, ticker, lowpriority , 0, level);
}
}