From: Roopesh Chander Date: Sun, 28 Oct 2018 12:42:18 +0000 (+0530) Subject: Model: Ensure name is not empty X-Git-Tag: 0.0.20181104-1~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d4409fc93ac98eacaac356d26d798e38f43153b;p=thirdparty%2Fwireguard-apple.git Model: Ensure name is not empty We don't need it because we don't have to open the new-config UI after scanning a QR code. This reverts commit db72e95. Signed-off-by: Roopesh Chander --- diff --git a/WireGuard/WireGuard/Model/Configuration.swift b/WireGuard/WireGuard/Model/Configuration.swift index d3d8b35..3f9b566 100644 --- a/WireGuard/WireGuard/Model/Configuration.swift +++ b/WireGuard/WireGuard/Model/Configuration.swift @@ -28,6 +28,7 @@ struct InterfaceConfiguration: Codable { init(name: String, privateKey: Data) { self.name = name self.privateKey = privateKey + if (name.isEmpty) { fatalError("Empty name") } if (privateKey.count != 32) { fatalError("Invalid private key") } } }