mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 21:10:25 +01:00
connectivity/trivial: add code comment
This commit is contained in:
parent
4c4dbcb78d
commit
d469421669
1 changed files with 13 additions and 4 deletions
|
|
@ -2788,8 +2788,10 @@ nm_device_check_connectivity_update_interval (NMDevice *self)
|
|||
}
|
||||
|
||||
static void
|
||||
concheck_update_state (NMDevice *self, int addr_family,
|
||||
NMConnectivityState state, gboolean allow_periodic_bump)
|
||||
concheck_update_state (NMDevice *self,
|
||||
int addr_family,
|
||||
NMConnectivityState state,
|
||||
gboolean allow_periodic_bump)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||
const gboolean IS_IPv4 = (addr_family == AF_INET);
|
||||
|
|
@ -2822,8 +2824,15 @@ concheck_update_state (NMDevice *self, int addr_family,
|
|||
state = NM_CONNECTIVITY_LIMITED;
|
||||
} else
|
||||
state = NM_CONNECTIVITY_NONE;
|
||||
} else if (state == NM_CONNECTIVITY_LIMITED && priv->state <= NM_DEVICE_STATE_DISCONNECTED)
|
||||
state = NM_CONNECTIVITY_NONE;
|
||||
} else if (state == NM_CONNECTIVITY_LIMITED) {
|
||||
/* NMConnectivity cannot distinguish between NONE and LIMITED connectivity. In both
|
||||
* cases, it just failed to fetch the URL.
|
||||
*
|
||||
* NMDevice coerces a LIMITED state to NONE here, if the logical state of the device
|
||||
* is disconnected. */
|
||||
if (priv->state <= NM_DEVICE_STATE_DISCONNECTED)
|
||||
state = NM_CONNECTIVITY_NONE;
|
||||
}
|
||||
|
||||
if (priv->concheck_x[IS_IPv4].state == state) {
|
||||
/* we got a connectivty update, but the state didn't change. If we were probing,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue