2005-05-06 Dan Williams <dcbw@redhat.com>

* gnome/applet/applet-dbus-device.c
	  gnome/applet/applet-dbus-info.c
	  gnome/applet/applet-dbus.c
	  gnome/applet/applet.c
	  gnome/applet/applet.h
		- (nmwa_get_device_for_nm_device) -> (nmwa_get_device_for_nm_path)

	* gnome/applet/applet-dbus.c
		- (nmwa_dbus_filter): trap DeviceCarrierOn/DeviceCarrierOff signals
			so we notice when wired device's carriers come back on.  Should
			fix issue with wired devices being grayed out even if the cable
			is in, for devices that support carrier detection.

	* gnome/applet/applet.c
		- (nmwa_driver_notify): bash focus-stealing prevention in the face
		- (nmwa_act_stage_to_pixbuf): Clarify wireless ACT_STAGE_DEVICE_CONFIG
			tooltip message
		- (nmwa_menu_item_activate, nmwa_menu_add_device_item, nmwa_menu_item_data_free):
			Fix situation where applet wouldn't respond to menu selections

	* src/NetworkManager.c
	  src/NetworkManagerDevice.c
	  src/NetworkManagerDbus.c
	  src/NetworkManagerDbus.h
		- (nm_dbus_signal_device_status_change) -> (nm_dbus_schedule_device_status_change_signal)

	* src/NetworkManagerDbus.c
		- (nm_dbus_send_network_not_found, nm_dbus_schedule_network_not_found_signal):
			Remove, no longer used or relevant
		- (nm_dbus_signal_device_status_change): Better signal enum->string matching
		- (nm_dbus_schedule_device_status_change_signal): add

	* src/NetworkManagerDevice.c
		- (nm_device_worker_thread_stop): don't try to join a NULL worker thread
		- (nm_device_set_link_active): Fix up switching for non-carrier-detect devices,
			ie don't deactivate them unless explicitly told to by the user.  Also send
			CARRIER_OFF / CARRIER_ON signals when link changes
		- (nm_device_set_essid, nm_device_set_enc_key, nm_device_is_up, nm_device_set_mode):
			Don't print error message when device is no longer around
		- (nm_device_deactivate): kill any current DHCP process attached to this device,
			not just during activation

	* src/NetworkManagerPolicy.c
		- (nm_policy_auto_get_best_device): Ignore semi-supported devices completely from
			auto-device-selection.
		- (nm_policy_device_change_check): Don't interrupt semi-supported devices

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_up_down_with_iface): Quiet first warning message when device
			is no longer present (Bill Moss)

	* src/backends/shvar.c
		- (svOpenFile): Open read-only to make SELinux happy

	* src/backends/NetworkManagerRedHat.c
		- (nm_system_device_get_system_config): Use SYSCONFDIR rather than hardcoding
			the path to the ifcfg-* files


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@613 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2005-05-06 21:20:42 +00:00
parent 0df0a73f11
commit 130b42a902
15 changed files with 266 additions and 232 deletions

View File

@@ -138,7 +138,7 @@ static gboolean nm_policy_activation_failed (NMActRequest *req)
* that failed, not one that we've automatically found and connected to.
*/
if (nm_act_request_get_user_requested (req))
nm_dbus_schedule_network_not_found_signal (data, nm_ap_get_essid (ap));
nm_dbus_schedule_device_status_change_signal (data, dev, ap, DEVICE_ACTIVATION_FAILED);
/* Add the AP to the invalid list and force a best ap update */
nm_ap_set_invalid (ap, TRUE);
@@ -149,7 +149,10 @@ static gboolean nm_policy_activation_failed (NMActRequest *req)
ap ? nm_ap_get_essid (ap) : "(none)");
}
else
{
nm_info ("Activation (%s) failed.", nm_device_get_iface (dev));
nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_ACTIVATION_FAILED);
}
nm_device_deactivate (dev, FALSE);
nm_schedule_state_change_signal_broadcast (data);
@@ -218,8 +221,8 @@ static NMDevice * nm_policy_auto_get_best_device (NMData *data, NMAccessPoint **
guint prio = 0;
NMDevice *dev = (NMDevice *)(elt->data);
/* Skip unsupported devices */
if (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED)
/* Skip devices that can't do carrier detect or can't do wireless scanning */
if (nm_device_get_driver_support_level (dev) != NM_DRIVER_FULLY_SUPPORTED)
continue;
dev_type = nm_device_get_type (dev);
@@ -315,11 +318,24 @@ static gboolean nm_policy_device_change_check (NMData *data)
if (!nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
return FALSE;
/* Don't interrupt a currently activating device. */
if (old_dev && nm_device_is_activating (old_dev))
if (old_dev)
{
nm_info ("Old device '%s' activating, won't change.", nm_device_get_iface (old_dev));
goto out;
/* Don't interrupt a currently activating device. */
if (nm_device_is_activating (old_dev))
{
nm_info ("Old device '%s' activating, won't change.", nm_device_get_iface (old_dev));
goto out;
}
/* Don't interrupt semi-supported devices either. If the user chose one, they must
* explicitly choose to move to another device, we're not going to move for them.
*/
if (nm_device_get_driver_support_level (old_dev) != NM_DRIVER_FULLY_SUPPORTED)
{
nm_info ("Old device '%s' was semi-supported and user chosen, won't change unless told to.",
nm_device_get_iface (old_dev));
goto out;
}
}
new_dev = nm_policy_auto_get_best_device (data, &ap);