wifi: Empty AP BSSID is NULL, not an invalid address

Since 3a54d050 the AP address is not a gbyte[], but a char *. The fake AP BSSID
fixup could trigger an assertion failure:

Oct 26 11:14:45 goatlord.localdomain NetworkManager[540]: nm_ethernet_address_is_valid: assertion 'addr != NULL' failed

https://bugzilla.gnome.org/show_bug.cgi?id=739258

Fixes: 3a54d05098
This commit is contained in:
Lubomir Rintel 2014-10-27 19:46:48 +01:00 committed by Thomas Haller
parent d3ebe386cc
commit 38bf08ec44

View file

@ -3021,7 +3021,7 @@ activation_success_handler (NMDevice *device)
* the BSSID off the card and fill in the BSSID of the activation AP.
*/
nm_platform_wifi_get_bssid (ifindex, bssid);
if (!nm_ethernet_address_is_valid (nm_ap_get_address (ap), -1)) {
if (!nm_ap_get_address (ap)) {
char *bssid_str = nm_utils_hwaddr_ntoa (bssid, ETH_ALEN);
nm_ap_set_address (ap, bssid_str);
g_free (bssid_str);