2005-05-15 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.[ch] src/NetworkManagerPolicy.c src/NetworkManager.c src/nm-dbus-nm.c - Remove the "just_added" parameter from nm_device_deactivate(). We no longer send the DeviceNoLongerActive signal unconditionally, but only when the device is actually active. * dispatcher-daemon/NetworkManagerDispatcher.c - (nmd_execute_scripts): convert to GLib directory functions from opendir(), and simplify the logic - (nmd_get_device_name): copy value from dbus reply so we don't segfault when we free it later on * initscript/RedHat/Makefile.am initscript/RedHat/NetworkManagerDispatcher - Add initscript for NetworkManagerDispatcher Patch from Bill Moss: * dispatcher-daemon/NetworkManagerDispatcher.c - Remove IP4AddressChange signal code including nmd_get_device_ip4_address() * src/NetworkManagerDbus.c - (nm_dbus_signal_device_ip4_address_change): remove. If the device goes up, and DeviceNowActive gets signaled, then the device has a new IP address anyway. There's no need for a separate signal. * src/NetworkManagerDevice.c - (nm_device_update_ip4_address): Don't send IP4AddressChange signal * src/NetworkManagerPolicy.c - (nm_policy_activation_finish): Send DeviceNowActive signal when the device activates successfully. This kind of went missing when I reworked the activation code. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@634 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -74,6 +74,7 @@ gboolean nm_policy_activation_finish (NMActRequest *req)
|
||||
}
|
||||
|
||||
nm_info ("Activation (%s) successful, device activated.", nm_device_get_iface (dev));
|
||||
nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_NOW_ACTIVE);
|
||||
nm_schedule_state_change_signal_broadcast (data);
|
||||
|
||||
out:
|
||||
@@ -154,7 +155,7 @@ static gboolean nm_policy_activation_failed (NMActRequest *req)
|
||||
nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_ACTIVATION_FAILED);
|
||||
}
|
||||
|
||||
nm_device_deactivate (dev, FALSE);
|
||||
nm_device_deactivate (dev);
|
||||
nm_schedule_state_change_signal_broadcast (data);
|
||||
nm_policy_schedule_device_change_check (data);
|
||||
|
||||
@@ -372,7 +373,7 @@ static gboolean nm_policy_device_change_check (NMData *data)
|
||||
{
|
||||
/* Terminate current connection */
|
||||
nm_info ("SWITCH: terminating current connection '%s' because it's no longer valid.", nm_device_get_iface (old_dev));
|
||||
nm_device_deactivate (old_dev, FALSE);
|
||||
nm_device_deactivate (old_dev);
|
||||
do_switch = TRUE;
|
||||
}
|
||||
else if (old_dev && new_dev)
|
||||
@@ -466,7 +467,7 @@ static gboolean nm_policy_device_activation (NMActRequest *req)
|
||||
g_assert (data);
|
||||
|
||||
if ((old_dev = nm_get_active_device (data)))
|
||||
nm_device_deactivate (old_dev, FALSE);
|
||||
nm_device_deactivate (old_dev);
|
||||
|
||||
new_dev = nm_act_request_get_dev (req);
|
||||
if (nm_device_is_activating (new_dev))
|
||||
|
Reference in New Issue
Block a user