From def921801f1ce9d1c4224648334f99db99199d71 Mon Sep 17 00:00:00 2001 From: Andrej Mihajlov Date: Wed, 2 Dec 2020 13:42:15 +0100 Subject: [PATCH] WireGuardKit: Rename cannotLocateSocketDescriptor -> cannotLocateTunnelFileDescriptor in WireGuardAdapterError Signed-off-by: Andrej Mihajlov --- .../WireGuardNetworkExtension/PacketTunnelProvider.swift | 4 ++-- WireGuardKit/Sources/WireGuardKit/WireGuardAdapter.swift | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift index fc932df..94dbbdd 100644 --- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift +++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift @@ -42,8 +42,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider { } switch adapterError { - case .cannotLocateSocketDescriptor: - wg_log(.error, staticMessage: "Starting tunnel failed: Could not determine file descriptor") + case .cannotLocateTunnelFileDescriptor: + wg_log(.error, staticMessage: "Starting tunnel failed: could not determine file descriptor") errorNotifier.notify(PacketTunnelProviderError.couldNotDetermineFileDescriptor) completionHandler(PacketTunnelProviderError.couldNotDetermineFileDescriptor) diff --git a/WireGuardKit/Sources/WireGuardKit/WireGuardAdapter.swift b/WireGuardKit/Sources/WireGuardKit/WireGuardAdapter.swift index 505b62f..749def3 100644 --- a/WireGuardKit/Sources/WireGuardKit/WireGuardAdapter.swift +++ b/WireGuardKit/Sources/WireGuardKit/WireGuardAdapter.swift @@ -6,8 +6,8 @@ import NetworkExtension import libwg_go public enum WireGuardAdapterError: Error { - /// Failure to locate socket descriptor. - case cannotLocateSocketDescriptor + /// Failure to locate tunnel file descriptor. + case cannotLocateTunnelFileDescriptor /// Failure to perform an operation in such state case invalidState @@ -155,7 +155,7 @@ public class WireGuardAdapter { } guard let tunnelFileDescriptor = self.tunnelFileDescriptor else { - completionHandler(.cannotLocateSocketDescriptor) + completionHandler(.cannotLocateTunnelFileDescriptor) return }