2007-09-20 Dan Williams <dcbw@redhat.com>
* src/nm-manager.h src/nm-device.c - (nm_device_activate): actually check if a given connection exists before assuming it doesn't git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2828 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2007-09-20 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/nm-manager.h
|
||||||
|
src/nm-device.c
|
||||||
|
- (nm_device_activate): actually check if a given connection
|
||||||
|
exists before assuming it doesn't
|
||||||
|
|
||||||
2007-09-20 Tambet Ingo <tambet@gmail.com>
|
2007-09-20 Tambet Ingo <tambet@gmail.com>
|
||||||
|
|
||||||
* libnm-util/nm-connection.c (register_default_creators): Use defined
|
* libnm-util/nm-connection.c (register_default_creators): Use defined
|
||||||
|
@@ -1221,6 +1221,21 @@ nm_device_activate (NMDeviceInterface *device,
|
|||||||
g_return_if_fail (connection_path == NULL);
|
g_return_if_fail (connection_path == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!connection) {
|
||||||
|
NMManager *mgr = nm_manager_get ();
|
||||||
|
NMConnectionType type = NM_CONNECTION_TYPE_UNKNOWN;
|
||||||
|
|
||||||
|
if (!strcmp (service_name, NM_DBUS_SERVICE_USER_SETTINGS))
|
||||||
|
type = NM_CONNECTION_TYPE_USER;
|
||||||
|
else if (!strcmp (service_name, NM_DBUS_SERVICE_SYSTEM_SETTINGS))
|
||||||
|
type = NM_CONNECTION_TYPE_SYSTEM;
|
||||||
|
|
||||||
|
if (type != NM_CONNECTION_TYPE_UNKNOWN)
|
||||||
|
connection = nm_manager_get_connection_by_object_path (mgr, type, connection_path);
|
||||||
|
|
||||||
|
g_object_unref (mgr);
|
||||||
|
}
|
||||||
|
|
||||||
nm_info ("Activating device %s", nm_device_get_iface (self));
|
nm_info ("Activating device %s", nm_device_get_iface (self));
|
||||||
if (connection) {
|
if (connection) {
|
||||||
if (device_activation_precheck (self, connection) == FALSE)
|
if (device_activation_precheck (self, connection) == FALSE)
|
||||||
|
@@ -55,7 +55,8 @@ void nm_manager_sleep (NMManager *manager, gboolean sleep);
|
|||||||
|
|
||||||
/* Connections */
|
/* Connections */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NM_CONNECTION_TYPE_SYSTEM = 0,
|
NM_CONNECTION_TYPE_UNKNOWN = 0,
|
||||||
|
NM_CONNECTION_TYPE_SYSTEM,
|
||||||
NM_CONNECTION_TYPE_USER,
|
NM_CONNECTION_TYPE_USER,
|
||||||
} NMConnectionType;
|
} NMConnectionType;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user