NetworkManager r3512 - in trunk: . libnm-glib
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3512 - in trunk: . libnm-glib
- Date: Sat, 29 Mar 2008 20:07:30 +0000 (GMT)
Author: dcbw
Date: Sat Mar 29 20:07:30 2008
New Revision: 3512
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3512&view=rev
Log:
2008-03-29 Dan Williams <dcbw redhat com>
* libnm-glib/nm-device-802-11-wireless.c
- (access_point_added_proxy): create new APs if not found
Modified:
trunk/ChangeLog
trunk/libnm-glib/nm-device-802-11-wireless.c
Modified: trunk/libnm-glib/nm-device-802-11-wireless.c
==============================================================================
--- trunk/libnm-glib/nm-device-802-11-wireless.c (original)
+++ trunk/libnm-glib/nm-device-802-11-wireless.c Sat Mar 29 20:07:30 2008
@@ -258,13 +258,28 @@
access_point_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
{
NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (user_data);
- NMAccessPoint *ap;
+ NMDevice80211WirelessPrivate *priv;
+ GObject *ap;
g_return_if_fail (self != NULL);
- ap = nm_device_802_11_wireless_get_access_point_by_path (self, path);
+ ap = G_OBJECT (nm_device_802_11_wireless_get_access_point_by_path (self, path));
+ if (!ap) {
+ DBusGConnection *connection = nm_object_get_connection (NM_OBJECT (self));
+
+ priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ ap = G_OBJECT (nm_object_cache_get (path));
+ if (ap) {
+ g_ptr_array_add (priv->aps, g_object_ref (ap));
+ } else {
+ ap = G_OBJECT (nm_access_point_new (connection, path));
+ if (ap)
+ g_ptr_array_add (priv->aps, ap);
+ }
+ }
+
if (ap)
- g_signal_emit (self, signals[ACCESS_POINT_ADDED], 0, ap);
+ g_signal_emit (self, signals[ACCESS_POINT_ADDED], 0, NM_ACCESS_POINT (ap));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]