From ec031b1f19c7b85b52ef478b8dfe3f8e173cf046 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 21 Dec 2018 18:50:32 +0100 Subject: Get rid of superflous isActivateOnDemandEnabled key Signed-off-by: Jason A. Donenfeld --- .../PacketTunnelProvider.swift | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift') diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift index f32a004..27a42c5 100644 --- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift +++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift @@ -24,7 +24,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider { networkMonitor?.cancel() } - //swiftlint:disable:next function_body_length override func startTunnel(options: [String: NSObject]?, completionHandler startTunnelCompletionHandler: @escaping (Error?) -> Void) { let activationAttemptId = options?["activationAttemptId"] as? String let errorNotifier = ErrorNotifier(activationAttemptId: activationAttemptId, tunnelProvider: self) @@ -39,22 +38,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider { configureLogger() let tunnelName = tunnelConfiguration.interface.name - wg_log(.info, message: "Starting tunnel '\(tunnelName)'") + wg_log(.info, message: "Starting tunnel '\(tunnelName)' from the " + (activationAttemptId == nil ? "OS directly, rather than the app" : "app")) - if activationAttemptId != nil { - wg_log(.info, staticMessage: "Tunnel activated from the app") - } else { - wg_log(.info, staticMessage: "Tunnel not activated from the app") - } - - let isActivateOnDemandEnabled = tunnelProviderProtocol.isActivateOnDemandEnabled - if isActivateOnDemandEnabled { - wg_log(.info, staticMessage: "Tunnel has Activate On Demand enabled") - } else { - wg_log(.info, staticMessage: "Tunnel has Activate On Demand disabled") - } - - errorNotifier.isActivateOnDemandEnabled = isActivateOnDemandEnabled errorNotifier.tunnelName = tunnelName let endpoints = tunnelConfiguration.peers.map { $0.endpoint } -- cgit v1.2.3-59-g8ed1b