aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-11-10 15:50:56 +0530
committerRoopesh Chander <roop@roopc.net>2018-11-10 16:44:28 +0530
commite8d68396cab079255db6183a65f889b0dd71039c (patch)
tree5f5c9b737a43334bcb54c13bfb502ccbfc590491 /WireGuard/WireGuard/UI
parentTunnelsManager: startDeactivation() need not take a completion handler (diff)
downloadwireguard-apple-e8d68396cab079255db6183a65f889b0dd71039c.tar.xz
wireguard-apple-e8d68396cab079255db6183a65f889b0dd71039c.zip
VPN: When activating while another tunnel is active, deactivate the other tunnel
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift15
-rw-r--r--WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift2
2 files changed, 2 insertions, 15 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
index d06f632..fd56588 100644
--- a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
+++ b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
@@ -23,21 +23,6 @@ class ErrorPresenter {
// TunnelActivationError
case TunnelActivationError.tunnelActivationFailed:
return ("Activation failure", "The tunnel could not be activated due to an internal error")
- case TunnelActivationError.attemptingActivationWhenAnotherTunnelIsBusy(let otherTunnelStatus):
- let statusString: String = {
- switch (otherTunnelStatus) {
- case .active: fallthrough
- case .reasserting: fallthrough
- case .restarting:
- return "active"
- case .activating: fallthrough
- case .deactivating:
- return "being deactivated"
- case .inactive:
- fatalError()
- }
- }()
- return ("Activation failure", "Another tunnel is currently \(statusString)")
default:
os_log("ErrorPresenter: Error not presented: %{public}@", log: OSLog.default, type: .error, "\(error)")
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift
index 5209b3a..92d5c64 100644
--- a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift
@@ -259,6 +259,8 @@ class TunnelDetailTableViewStatusCell: UITableViewCell {
text = "Reactivating"
case .restarting:
text = "Restarting"
+ case .waiting:
+ text = "Waiting"
}
textLabel?.text = text
DispatchQueue.main.async { [weak statusSwitch] in