Skip to content

Commit be34c03

Browse files
committed
Only retrieve autoJoin info in Release builds, fix swiftlint warnings
1 parent 674b4d6 commit be34c03

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

HeliPort/Appearance/StatusMenu.swift

+2
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,9 @@ final class StatusMenu: NSMenu, NSMenuDelegate {
494494
var entity: NetworkInfoStorageEntity?
495495
var hideDisconnect = true
496496
if self.status == ITL80211_S_RUN && get_station_info(&staInfo) == KERN_SUCCESS {
497+
#if !DEBUG
497498
entity = CredentialsManager.instance.getStorageFromSsid(String(cString: &staInfo.ssid.0))
499+
#endif
498500
hideDisconnect = entity?.autoJoin ?? false
499501
self.isNetworkConnected = true
500502
let bsd = String(self.bsdItem.title).replacingOccurrences(of: String.interfaceName, with: "",

HeliPort/NetworkManager.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ final class NetworkManager {
256256

257257
class func getSecurityType(_ info: ioctl_network_info) -> itl80211_security {
258258
if info.supported_rsnprotos & ITL80211_PROTO_RSN.rawValue != 0 {
259-
//wpa2
259+
// WPA2
260260
if info.rsn_akms & ITL80211_AKM_8021X.rawValue != 0 {
261261
if info.supported_rsnprotos & ITL80211_PROTO_WPA.rawValue != 0 {
262262
return ITL80211_SECURITY_WPA_ENTERPRISE_MIXED
@@ -273,7 +273,7 @@ final class NetworkManager {
273273
return ITL80211_SECURITY_PERSONAL
274274
}
275275
} else if info.supported_rsnprotos & ITL80211_PROTO_WPA.rawValue != 0 {
276-
//wpa
276+
// WPA
277277
if info.rsn_akms & ITL80211_AKM_8021X.rawValue != 0 {
278278
return ITL80211_SECURITY_WPA_ENTERPRISE
279279
} else if info.rsn_akms & ITL80211_AKM_PSK.rawValue != 0 {
@@ -286,7 +286,6 @@ final class NetworkManager {
286286
} else if info.supported_rsnprotos == 0 {
287287
return ITL80211_SECURITY_NONE
288288
}
289-
//TODO wpa3
290289
return ITL80211_SECURITY_UNKNOWN
291290
}
292291
}

0 commit comments

Comments
 (0)