mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 10:48:12 +02:00
2008-01-24 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c - (get_access_point): move the "/" check here; check for invalid path too - (nm_device_802_11_wireless_set_active_ap): leave the "/" check up to get_access_point() - (access_point_added_proxy, access_point_removed_proxy): don't try to send signals for non-existent access points git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3269 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
6ef8fc433f
commit
4c2f6219a9
2 changed files with 19 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
|||
2008-01-24 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* libnm-glib/nm-device-802-11-wireless.c
|
||||
- (get_access_point): move the "/" check here; check for invalid path
|
||||
too
|
||||
- (nm_device_802_11_wireless_set_active_ap): leave the "/" check up
|
||||
to get_access_point()
|
||||
- (access_point_added_proxy, access_point_removed_proxy): don't try
|
||||
to send signals for non-existent access points
|
||||
|
||||
2008-01-24 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* libnm-glib/nm-device-802-11-wireless.c
|
||||
|
|
|
|||
|
|
@ -190,6 +190,12 @@ get_access_point (NMDevice80211Wireless *device, const char *path, gboolean crea
|
|||
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device);
|
||||
NMAccessPoint *ap;
|
||||
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
|
||||
/* path of "/" means NULL */
|
||||
if (!strcmp (path, "/"))
|
||||
return NULL;
|
||||
|
||||
ap = g_hash_table_lookup (priv->aps, path);
|
||||
if (!ap && create_if_not_found) {
|
||||
ap = nm_access_point_new (nm_object_get_connection (NM_OBJECT (device)), path);
|
||||
|
|
@ -214,8 +220,7 @@ nm_device_802_11_wireless_set_active_ap (NMDevice80211Wireless *self,
|
|||
priv->current_ap = NULL;
|
||||
}
|
||||
|
||||
/* ap_path of "/" means no AP */
|
||||
if (ap_path && strcmp (ap_path, "/")) {
|
||||
if (ap_path) {
|
||||
priv->current_ap = get_access_point (self, ap_path, TRUE);
|
||||
if (priv->current_ap)
|
||||
g_object_ref (priv->current_ap);
|
||||
|
|
@ -330,7 +335,7 @@ access_point_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
|
|||
NMAccessPoint *ap;
|
||||
|
||||
ap = get_access_point (device, path, TRUE);
|
||||
if (device)
|
||||
if (device && ap)
|
||||
g_signal_emit (device, signals[ACCESS_POINT_ADDED], 0, ap);
|
||||
}
|
||||
|
||||
|
|
@ -341,7 +346,7 @@ access_point_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
|
|||
NMAccessPoint *ap;
|
||||
|
||||
ap = get_access_point (device, path, FALSE);
|
||||
if (device) {
|
||||
if (device && ap) {
|
||||
g_signal_emit (device, signals[ACCESS_POINT_REMOVED], 0, ap);
|
||||
g_hash_table_remove (NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device)->aps, path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue