mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(networks): get missing 2 bytes back in SSID
This commit is contained in:
parent
cf4aa4ed62
commit
6ae0af6853
|
@ -103,11 +103,17 @@ type WLAN_INTERFACE_INFO struct {
|
||||||
isState uint32
|
isState uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:revive
|
||||||
|
const (
|
||||||
|
WLAN_MAX_NAME_LENGTH int64 = 256
|
||||||
|
DOT11_SSID_MAX_LENGTH int64 = 32
|
||||||
|
)
|
||||||
|
|
||||||
//nolint:revive, unused
|
//nolint:revive, unused
|
||||||
type WLAN_CONNECTION_ATTRIBUTES struct {
|
type WLAN_CONNECTION_ATTRIBUTES struct {
|
||||||
isState uint32
|
isState uint32
|
||||||
wlanConnectionMode uint32
|
wlanConnectionMode uint32
|
||||||
strProfileName [256]uint16
|
strProfileName [WLAN_MAX_NAME_LENGTH]uint16
|
||||||
wlanAssociationAttributes WLAN_ASSOCIATION_ATTRIBUTES
|
wlanAssociationAttributes WLAN_ASSOCIATION_ATTRIBUTES
|
||||||
wlanSecurityAttributes WLAN_SECURITY_ATTRIBUTES
|
wlanSecurityAttributes WLAN_SECURITY_ATTRIBUTES
|
||||||
}
|
}
|
||||||
|
@ -135,7 +141,7 @@ type WLAN_SECURITY_ATTRIBUTES struct {
|
||||||
//nolint:revive
|
//nolint:revive
|
||||||
type DOT11_SSID struct {
|
type DOT11_SSID struct {
|
||||||
uSSIDLength uint32
|
uSSIDLength uint32
|
||||||
ucSSID [32]uint8
|
ucSSID [DOT11_SSID_MAX_LENGTH]uint8
|
||||||
}
|
}
|
||||||
|
|
||||||
func (env *Shell) getConnections() []*Connection {
|
func (env *Shell) getConnections() []*Connection {
|
||||||
|
@ -234,7 +240,7 @@ func (env *Shell) parseNetworkInterface(network *WLAN_INTERFACE_INFO, clientHand
|
||||||
}
|
}
|
||||||
|
|
||||||
// Query wifi connection state
|
// Query wifi connection state
|
||||||
var dataSize uint16
|
var dataSize uint32
|
||||||
var wlanAttr *WLAN_CONNECTION_ATTRIBUTES
|
var wlanAttr *WLAN_CONNECTION_ATTRIBUTES
|
||||||
e, _, err := hWlanQueryInterface.Call(uintptr(clientHandle),
|
e, _, err := hWlanQueryInterface.Call(uintptr(clientHandle),
|
||||||
uintptr(unsafe.Pointer(&network.InterfaceGuid)),
|
uintptr(unsafe.Pointer(&network.InterfaceGuid)),
|
||||||
|
|
Loading…
Reference in a new issue