WireGuardKit: Rename cannotLocateSocketDescriptor -> cannotLocateTunnelFileDescriptor in WireGuardAdapterError
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
parent
41e006a407
commit
def921801f
|
@ -42,8 +42,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch adapterError {
|
switch adapterError {
|
||||||
case .cannotLocateSocketDescriptor:
|
case .cannotLocateTunnelFileDescriptor:
|
||||||
wg_log(.error, staticMessage: "Starting tunnel failed: Could not determine file descriptor")
|
wg_log(.error, staticMessage: "Starting tunnel failed: could not determine file descriptor")
|
||||||
errorNotifier.notify(PacketTunnelProviderError.couldNotDetermineFileDescriptor)
|
errorNotifier.notify(PacketTunnelProviderError.couldNotDetermineFileDescriptor)
|
||||||
completionHandler(PacketTunnelProviderError.couldNotDetermineFileDescriptor)
|
completionHandler(PacketTunnelProviderError.couldNotDetermineFileDescriptor)
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ import NetworkExtension
|
||||||
import libwg_go
|
import libwg_go
|
||||||
|
|
||||||
public enum WireGuardAdapterError: Error {
|
public enum WireGuardAdapterError: Error {
|
||||||
/// Failure to locate socket descriptor.
|
/// Failure to locate tunnel file descriptor.
|
||||||
case cannotLocateSocketDescriptor
|
case cannotLocateTunnelFileDescriptor
|
||||||
|
|
||||||
/// Failure to perform an operation in such state
|
/// Failure to perform an operation in such state
|
||||||
case invalidState
|
case invalidState
|
||||||
|
@ -155,7 +155,7 @@ public class WireGuardAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
guard let tunnelFileDescriptor = self.tunnelFileDescriptor else {
|
guard let tunnelFileDescriptor = self.tunnelFileDescriptor else {
|
||||||
completionHandler(.cannotLocateSocketDescriptor)
|
completionHandler(.cannotLocateTunnelFileDescriptor)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue