mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-03-03 20:22:07 +00:00
Combine double log invocations
This commit is contained in:
parent
2cfba533a5
commit
d0cc2a8afd
@ -395,8 +395,7 @@ class TunnelContainer: NSObject {
|
||||
activationDelegate?.tunnelActivationAttemptFailed(tunnel: self, error: .failedWhileSaving(systemError: error!))
|
||||
return
|
||||
}
|
||||
wg_log(.debug, staticMessage: "startActivation: Tunnel saved after re-enabling")
|
||||
wg_log(.debug, staticMessage: "startActivation: Invoking startActivation")
|
||||
wg_log(.debug, staticMessage: "startActivation: Tunnel saved after re-enabling, invoking startActivation")
|
||||
self.startActivation(recursionCount: recursionCount + 1, lastError: NEVPNError(NEVPNError.configurationUnknown), activationDelegate: activationDelegate)
|
||||
}
|
||||
return
|
||||
@ -434,8 +433,7 @@ class TunnelContainer: NSObject {
|
||||
activationDelegate?.tunnelActivationAttemptFailed(tunnel: self, error: .failedWhileLoading(systemError: systemError))
|
||||
return
|
||||
}
|
||||
wg_log(.debug, staticMessage: "startActivation: Tunnel reloaded")
|
||||
wg_log(.debug, staticMessage: "startActivation: Invoking startActivation")
|
||||
wg_log(.debug, staticMessage: "startActivation: Tunnel reloaded, invoking startActivation")
|
||||
self.startActivation(recursionCount: recursionCount + 1, lastError: systemError, activationDelegate: activationDelegate)
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user