mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-23 11:14:29 +00:00
2008-03-24 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c - (client_device_added_proxy): add new devices to the internal device list so they appear to clients git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3496 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
31659eeb8d
commit
c5a9312e24
|
@ -1,3 +1,9 @@
|
|||
2008-03-24 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* libnm-glib/nm-client.c
|
||||
- (client_device_added_proxy): add new devices to the internal device
|
||||
list so they appear to clients
|
||||
|
||||
2008-03-24 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Massive fixup of libnm-glib to:
|
||||
|
|
|
@ -426,9 +426,23 @@ static void
|
|||
client_device_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
|
||||
{
|
||||
NMClient *client = NM_CLIENT (user_data);
|
||||
NMDevice *device;
|
||||
NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
|
||||
GObject *device;
|
||||
|
||||
device = G_OBJECT (nm_client_get_device_by_path (client, path));
|
||||
if (!device) {
|
||||
DBusGConnection *connection = nm_object_get_connection (NM_OBJECT (client));
|
||||
|
||||
device = G_OBJECT (nm_object_cache_get (path));
|
||||
if (device) {
|
||||
g_ptr_array_add (priv->devices, g_object_ref (device));
|
||||
} else {
|
||||
device = G_OBJECT (nm_device_new (connection, path));
|
||||
if (device)
|
||||
g_ptr_array_add (priv->devices, device);
|
||||
}
|
||||
}
|
||||
|
||||
device = nm_client_get_device_by_path (client, path);
|
||||
if (device)
|
||||
g_signal_emit (client, signals[DEVICE_ADDED], 0, device);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue