[network-manager-applet/NMA_0_8_1] utils: don't crash if AP BSSID isn't available (rh #603236)
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/NMA_0_8_1] utils: don't crash if AP BSSID isn't available (rh #603236)
- Date: Tue, 15 Jun 2010 17:59:21 +0000 (UTC)
commit 8967f63ed08daaa40755337a1c4073b9dfde5807
Author: Dan Williams <dcbw redhat com>
Date: Tue Jun 15 10:57:28 2010 -0700
utils: don't crash if AP BSSID isn't available (rh #603236)
Due to D-Bus issues, it may not be since it's retrieved on-the-fly
from NM. If for some reason it wasn't available, don't crash.
src/utils/utils.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/utils/utils.c b/src/utils/utils.c
index 227c382..3af1adc 100644
--- a/src/utils/utils.c
+++ b/src/utils/utils.c
@@ -402,8 +402,10 @@ utils_check_ap_compatible (NMAccessPoint *ap,
setting_bssid = nm_setting_wireless_get_bssid (s_wireless);
if (setting_bssid) {
struct ether_addr ap_addr;
+ const char *hw_addr;
- if (ether_aton_r (nm_access_point_get_hw_address (ap), &ap_addr)) {
+ hw_addr = nm_access_point_get_hw_address (ap);
+ if (hw_addr && ether_aton_r (hw_addr, &ap_addr)) {
if (memcmp (setting_bssid->data, &ap_addr, ETH_ALEN))
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]