Drop deprecated configuration values

- debugLogKey
- lastErrorKey
This commit is contained in:
Davide De Rosa 2018-10-25 21:08:49 +02:00
parent 12e0a55f7a
commit 9726158030
4 changed files with 2 additions and 17 deletions

View File

@ -49,8 +49,6 @@ class AppConstants {
// builder.debugLogFormat = "$Dyyyy-MM-dd HH:mm:ss.SSS$d $L $N.$F:$l - $M"
// builder.debugLogFormat = "$DHH:mm:ss$d $N.$F:$l - $M"
builder.debugLogFormat = Log.debugFormat
builder.debugLogKey = "LastVPNLog"
builder.lastErrorKey = "LastVPNError"
return builder.build()
}

View File

@ -280,20 +280,11 @@ class ConnectionService: Codable {
}
var vpnLastError: TunnelKitProvider.ProviderError? {
guard let key = baseConfiguration.lastErrorKey else {
return nil
}
guard let rawValue = defaults.string(forKey: key) else {
return nil
}
return TunnelKitProvider.ProviderError(rawValue: rawValue)
return baseConfiguration.lastError(in: appGroup)
}
func clearVpnLastError() {
guard let key = baseConfiguration.lastErrorKey else {
return
}
defaults.removeObject(forKey: key)
baseConfiguration.clearLastError(in: appGroup)
}
// func eraseVpnLog() {

View File

@ -60,8 +60,6 @@ class HostConnectionProfile: ConnectionProfile, Codable, Equatable {
builder.mtu = configuration.mtu
builder.shouldDebug = configuration.shouldDebug
builder.debugLogFormat = configuration.debugLogFormat
builder.debugLogKey = configuration.debugLogKey
builder.lastErrorKey = configuration.lastErrorKey
return builder.build()
}

View File

@ -120,8 +120,6 @@ class ProviderConnectionProfile: ConnectionProfile, Codable, Equatable {
builder.mtu = configuration.mtu
builder.shouldDebug = configuration.shouldDebug
builder.debugLogFormat = configuration.debugLogFormat
builder.debugLogKey = configuration.debugLogKey
builder.lastErrorKey = configuration.lastErrorKey
if let address = manualAddress {
builder.prefersResolvedAddresses = true