mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 04:00:17 +01:00
device/trivial: rename get_dhcp_timeout() virtual function to have a unique name
This is C, we have almost no IDE support. And ctags/cscope is much more helpful if we use unique names. Don't use the get_dhcp_timeout() name, because that is already used in "src/devices/nm-device.c" already. Rename.
This commit is contained in:
parent
e34db042af
commit
be4129bb2d
4 changed files with 8 additions and 8 deletions
|
|
@ -7557,8 +7557,8 @@ get_dhcp_timeout (NMDevice *self, int addr_family)
|
|||
return timeout;
|
||||
|
||||
klass = NM_DEVICE_GET_CLASS (self);
|
||||
if (klass->get_dhcp_timeout)
|
||||
timeout = klass->get_dhcp_timeout (self, addr_family);
|
||||
if (klass->get_dhcp_timeout_for_device)
|
||||
timeout = klass->get_dhcp_timeout_for_device (self, addr_family);
|
||||
|
||||
return timeout ?: NM_DHCP_TIMEOUT_DEFAULT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -437,8 +437,8 @@ typedef struct _NMDeviceClass {
|
|||
NMConnection *con_old,
|
||||
NMConnection *con_new);
|
||||
|
||||
guint32 (* get_dhcp_timeout) (NMDevice *self,
|
||||
int addr_family);
|
||||
guint32 (* get_dhcp_timeout_for_device) (NMDevice *self,
|
||||
int addr_family);
|
||||
|
||||
gboolean (* get_guessed_metered) (NMDevice *self);
|
||||
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ state_changed (NMDevice *device,
|
|||
}
|
||||
|
||||
static guint32
|
||||
get_dhcp_timeout (NMDevice *device, int addr_family)
|
||||
get_dhcp_timeout_for_device (NMDevice *device, int addr_family)
|
||||
{
|
||||
/* shorter timeout for mesh connectivity */
|
||||
return 20;
|
||||
|
|
@ -521,7 +521,7 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass)
|
|||
device_class->act_stage1_prepare = act_stage1_prepare;
|
||||
device_class->act_stage2_config = act_stage2_config;
|
||||
device_class->state_changed = state_changed;
|
||||
device_class->get_dhcp_timeout = get_dhcp_timeout;
|
||||
device_class->get_dhcp_timeout_for_device = get_dhcp_timeout_for_device;
|
||||
|
||||
obj_properties[PROP_COMPANION] =
|
||||
g_param_spec_string (NM_DEVICE_OLPC_MESH_COMPANION, "", "",
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ set_modem (NMDeviceModem *self, NMModem *modem)
|
|||
}
|
||||
|
||||
static guint32
|
||||
get_dhcp_timeout (NMDevice *device, int addr_family)
|
||||
get_dhcp_timeout_for_device (NMDevice *device, int addr_family)
|
||||
{
|
||||
/* DHCP is always done by the modem firmware, not by the network, and
|
||||
* by the time we get around to DHCP the firmware should already know
|
||||
|
|
@ -897,7 +897,7 @@ nm_device_modem_class_init (NMDeviceModemClass *klass)
|
|||
device_class->is_available = is_available;
|
||||
device_class->get_ip_iface_identifier = get_ip_iface_identifier;
|
||||
device_class->get_configured_mtu = nm_modem_get_configured_mtu;
|
||||
device_class->get_dhcp_timeout = get_dhcp_timeout;
|
||||
device_class->get_dhcp_timeout_for_device = get_dhcp_timeout_for_device;
|
||||
|
||||
device_class->state_changed = device_state_changed;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue