mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-18 15:42:15 +00:00
2006-01-03 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c - Recognize activation cancellation when waiting for DHCP configuration from dhcdbd - Ignore non-dhcdbd messages * src/nm-device.c - (real_act_stage3_ip_config_start): return to correct behavior of letting the dhcp-manager notify us of failure or success rather than incorrectly doing that ourselves - (nm_device_activate_stage4_ip_config_get): deal with activation cancellation a bit earlier git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1253 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
f1fad5ecd0
commit
1c5f300910
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2006-01-03 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/dhcp-manager/nm-dhcp-manager.c
|
||||||
|
- Recognize activation cancellation when waiting for DHCP
|
||||||
|
configuration from dhcdbd
|
||||||
|
- Ignore non-dhcdbd messages
|
||||||
|
|
||||||
|
* src/nm-device.c
|
||||||
|
- (real_act_stage3_ip_config_start): return to correct behavior
|
||||||
|
of letting the dhcp-manager notify us of failure or
|
||||||
|
success rather than incorrectly doing that ourselves
|
||||||
|
- (nm_device_activate_stage4_ip_config_get): deal with
|
||||||
|
activation cancellation a bit earlier
|
||||||
|
|
||||||
2006-01-03 Dan Williams <dcbw@redhat.com>
|
2006-01-03 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* src/nm-device-802-11-wireless.c
|
* src/nm-device-802-11-wireless.c
|
||||||
|
|
|
@ -452,9 +452,12 @@ static gboolean nm_completion_dhcp_bound_test(int tries,
|
||||||
nm_completion_args args)
|
nm_completion_args args)
|
||||||
{
|
{
|
||||||
NMActRequest * req = args[0];
|
NMActRequest * req = args[0];
|
||||||
|
NMDevice * dev = args[1];
|
||||||
|
|
||||||
if (state_is_bound (nm_act_request_get_dhcp_state (req)))
|
if (state_is_bound (nm_act_request_get_dhcp_state (req)))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
if (nm_device_activation_should_cancel (dev))
|
||||||
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -493,8 +496,12 @@ NMIP4Config * nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager, NMActReque
|
||||||
g_assert (dev);
|
g_assert (dev);
|
||||||
|
|
||||||
args[0] = req;
|
args[0] = req;
|
||||||
|
args[1] = dev;
|
||||||
nm_wait_for_completion (30, G_USEC_PER_SEC / 10,
|
nm_wait_for_completion (30, G_USEC_PER_SEC / 10,
|
||||||
nm_completion_dhcp_bound_test, NULL, args);
|
nm_completion_dhcp_bound_test, NULL, args);
|
||||||
|
if (nm_device_activation_should_cancel (dev))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!state_is_bound (nm_act_request_get_dhcp_state (req)))
|
if (!state_is_bound (nm_act_request_get_dhcp_state (req)))
|
||||||
{
|
{
|
||||||
nm_warning ("Tried to get IP4 Config for a device when dhcdbd wasn't in a BOUND state!");
|
nm_warning ("Tried to get IP4 Config for a device when dhcdbd wasn't in a BOUND state!");
|
||||||
|
@ -605,6 +612,9 @@ gboolean nm_dhcp_manager_process_signal (NMDHCPManager *manager, DBusMessage *me
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!(interface = dbus_message_get_interface (message)))
|
if (!(interface = dbus_message_get_interface (message)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
/* Ignore non-DHCP related messages */
|
||||||
|
if (strncmp (interface, "com.redhat.dhcp", 15))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
signature = dbus_message_get_signature (message);
|
signature = dbus_message_get_signature (message);
|
||||||
|
|
|
@ -827,6 +827,11 @@ real_act_stage3_ip_config_start (NMDevice *self,
|
||||||
/* Begin a DHCP transaction on the interface */
|
/* Begin a DHCP transaction on the interface */
|
||||||
if (!nm_dhcp_manager_begin_transaction (data->dhcp_manager, req))
|
if (!nm_dhcp_manager_begin_transaction (data->dhcp_manager, req))
|
||||||
ret = NM_ACT_STAGE_RETURN_FAILURE;
|
ret = NM_ACT_STAGE_RETURN_FAILURE;
|
||||||
|
|
||||||
|
/* DHCP devices will be notified by the DHCP manager when
|
||||||
|
* stuff happens.
|
||||||
|
*/
|
||||||
|
ret = NM_ACT_STAGE_RETURN_POSTPONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1012,6 +1017,13 @@ nm_device_activate_stage4_ip_config_get (NMActRequest *req)
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = NM_DEVICE_GET_CLASS (self)->act_stage4_get_ip4_config (self, req, &ip4_config);
|
ret = NM_DEVICE_GET_CLASS (self)->act_stage4_get_ip4_config (self, req, &ip4_config);
|
||||||
|
|
||||||
|
if (nm_device_activation_should_cancel (self))
|
||||||
|
{
|
||||||
|
nm_device_schedule_activation_handle_cancel (req);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == NM_ACT_STAGE_RETURN_POSTPONE)
|
if (ret == NM_ACT_STAGE_RETURN_POSTPONE)
|
||||||
goto out;
|
goto out;
|
||||||
else if (!ip4_config || (ret == NM_ACT_STAGE_RETURN_FAILURE))
|
else if (!ip4_config || (ret == NM_ACT_STAGE_RETURN_FAILURE))
|
||||||
|
|
Loading…
Reference in a new issue