aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuardNetworkExtension
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-22 02:21:07 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-22 02:21:07 +0100
commitf2000aa1dae2c6b4ca22ad6c52cd42c53d5f5cbd (patch)
tree0a2d46d240782ba41d86aa11901690f21b5077c7 /WireGuard/WireGuardNetworkExtension
parentBump go bridge (diff)
downloadwireguard-apple-f2000aa1dae2c6b4ca22ad6c52cd42c53d5f5cbd.tar.xz
wireguard-apple-f2000aa1dae2c6b4ca22ad6c52cd42c53d5f5cbd.zip
Combine double log invocations
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'WireGuard/WireGuardNetworkExtension')
-rw-r--r--WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift5
1 files changed, 2 insertions, 3 deletions
diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
index 7a461c4..bcec9b2 100644
--- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
+++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
@@ -66,7 +66,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
let handle = wireguardSettings.withGoString { return wgTurnOn($0, fileDescriptor) }
if handle < 0 {
- wg_log(.error, staticMessage: "Starting tunnel failed: Could not start WireGuard")
+ wg_log(.error, message: "Starting tunnel failed with wgTurnOn returning \(handle)")
errorNotifier.notify(PacketTunnelProviderError.couldNotStartWireGuard)
startTunnelCompletionHandler(PacketTunnelProviderError.couldNotStartWireGuard)
return
@@ -76,8 +76,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
let networkSettings: NEPacketTunnelNetworkSettings = packetTunnelSettingsGenerator!.generateNetworkSettings()
setTunnelNetworkSettings(networkSettings) { error in
if let error = error {
- wg_log(.error, staticMessage: "Starting tunnel failed: Error setting network settings.")
- wg_log(.error, message: "Error from setTunnelNetworkSettings: \(error.localizedDescription)")
+ wg_log(.error, message: "Starting tunnel failed with setTunnelNetworkSettings returning \(error.localizedDescription)")
errorNotifier.notify(PacketTunnelProviderError.coultNotSetNetworkSettings)
startTunnelCompletionHandler(PacketTunnelProviderError.coultNotSetNetworkSettings)
} else {