mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 08:28:05 +02:00
connectivity: make platform argument to nm_connectivity_check_start() optional
The platform is used to detect whether to skip the connectivity check right away. It should be an optional argument, so one could avoid this pre-check. (cherry picked from commitb626baa313) (cherry picked from commita842280dbe)
This commit is contained in:
parent
4f489ac450
commit
36cdfe703f
1 changed files with 15 additions and 12 deletions
|
|
@ -870,6 +870,7 @@ nm_connectivity_check_start (NMConnectivity *self,
|
||||||
|
|
||||||
g_return_val_if_fail (NM_IS_CONNECTIVITY (self), NULL);
|
g_return_val_if_fail (NM_IS_CONNECTIVITY (self), NULL);
|
||||||
g_return_val_if_fail (callback, NULL);
|
g_return_val_if_fail (callback, NULL);
|
||||||
|
nm_assert (!platform || NM_IS_PLATFORM (platform));
|
||||||
|
|
||||||
priv = NM_CONNECTIVITY_GET_PRIVATE (self);
|
priv = NM_CONNECTIVITY_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
|
@ -898,6 +899,7 @@ nm_connectivity_check_start (NMConnectivity *self,
|
||||||
|
|
||||||
cb_data->concheck.ch_ifindex = ifindex;
|
cb_data->concheck.ch_ifindex = ifindex;
|
||||||
|
|
||||||
|
if (platform) {
|
||||||
state = check_platform_config (self,
|
state = check_platform_config (self,
|
||||||
platform,
|
platform,
|
||||||
ifindex,
|
ifindex,
|
||||||
|
|
@ -911,6 +913,7 @@ nm_connectivity_check_start (NMConnectivity *self,
|
||||||
cb_data->timeout_id = g_idle_add (_idle_cb, cb_data);
|
cb_data->timeout_id = g_idle_add (_idle_cb, cb_data);
|
||||||
return cb_data;
|
return cb_data;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* note that we pick up support for systemd-resolved right away when we need it.
|
/* note that we pick up support for systemd-resolved right away when we need it.
|
||||||
* We don't need to remember the setting, because we can (cheaply) check anew
|
* We don't need to remember the setting, because we can (cheaply) check anew
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue