NetworkManager r3241 - in trunk: . src



Author: dcbw
Date: Fri Jan 18 02:54:55 2008
New Revision: 3241
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3241&view=rev

Log:
2008-01-17  Dan Williams  <dcbw redhat com>

	* src/nm-manager.c
		- (check_connection_allowed): take an NMDeviceInterface instead of
			an NMDevice object as an argument
		- (nm_manager_activate_device): pass an NMDeviceInterface to
			check_connection_allowed()



Modified:
   trunk/ChangeLog
   trunk/src/nm-manager.c

Modified: trunk/src/nm-manager.c
==============================================================================
--- trunk/src/nm-manager.c	(original)
+++ trunk/src/nm-manager.c	Fri Jan 18 02:54:55 2008
@@ -1163,7 +1163,7 @@
 
 static gboolean
 check_connection_allowed (NMManager *manager,
-                          NMDevice *device,
+                          NMDeviceInterface *dev_iface,
                           NMConnection *connection,
                           const char *specific_object,
                           GError **error)
@@ -1183,7 +1183,7 @@
 		if (connection == system_connection)
 			continue;
 
-		if (nm_device_interface_check_connection_conflicts (NM_DEVICE_INTERFACE (device),
+		if (nm_device_interface_check_connection_conflicts (dev_iface,
 		                                                    connection,
 		                                                    system_connection)) {
 			allowed = FALSE;
@@ -1205,18 +1205,21 @@
 					   GError **error)
 {
 	NMActRequest *req;
+	NMDeviceInterface *dev_iface;
 	gboolean success;
 
 	g_return_val_if_fail (NM_IS_MANAGER (manager), FALSE);
 	g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
 	g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
 
+	dev_iface = NM_DEVICE_INTERFACE (device);
+
 	/* Ensure the requested connection is allowed to be activated */
-	if (!check_connection_allowed (manager, device, connection, specific_object, error))
+	if (!check_connection_allowed (manager, dev_iface, connection, specific_object, error))
 		return FALSE;
 
 	req = nm_act_request_new (connection, specific_object, user_requested);
-	success = nm_device_interface_activate (NM_DEVICE_INTERFACE (device), req, error);
+	success = nm_device_interface_activate (dev_iface, req, error);
 	g_object_unref (req);
 
 	return success;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]