mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 11:40:08 +01:00
device/trivial: rename argument in nm_device_connection_is_available()
The argument name should express what the caller wants
(he wants to know, whether the connection can be activated
for an internal or external activation request).
Whether that involves checking device-specific overrides, is
not the point -- nm_device_check_connection_compatible() is
also a virtual function with device-specific overrides.
(cherry picked from commit a7e0a038bf)
This commit is contained in:
parent
1158fd4f5b
commit
a042cec8a9
2 changed files with 7 additions and 5 deletions
|
|
@ -6809,11 +6809,13 @@ nm_device_set_dhcp_anycast_address (NMDevice *self, const char *addr)
|
|||
* nm_device_connection_is_available():
|
||||
* @self: the #NMDevice
|
||||
* @connection: the #NMConnection to check for availability
|
||||
* @allow_device_override: set to %TRUE to let the device do specific checks
|
||||
* @for_user_activation_request: set to %TRUE if we are checking whether
|
||||
* the connection is available on an explicit user request. This
|
||||
* also checks for device specific overrides.
|
||||
*
|
||||
* Check if @connection is available to be activated on @self. Normally this
|
||||
* only checks if the connection is in @self's AvailableConnections property.
|
||||
* If @allow_device_override is %TRUE then the device is asked to do specific
|
||||
* If @for_user_activation_request is %TRUE then the device is asked to do specific
|
||||
* checks that may bypass the AvailableConnections property.
|
||||
*
|
||||
* Returns: %TRUE if @connection can be activated on @self
|
||||
|
|
@ -6821,7 +6823,7 @@ nm_device_set_dhcp_anycast_address (NMDevice *self, const char *addr)
|
|||
gboolean
|
||||
nm_device_connection_is_available (NMDevice *self,
|
||||
NMConnection *connection,
|
||||
gboolean allow_device_override)
|
||||
gboolean for_user_activation_request)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||
gboolean available = FALSE;
|
||||
|
|
@ -6836,7 +6838,7 @@ nm_device_connection_is_available (NMDevice *self,
|
|||
}
|
||||
|
||||
available = !!g_hash_table_lookup (priv->available_connections, connection);
|
||||
if (!available && allow_device_override) {
|
||||
if (!available && for_user_activation_request) {
|
||||
/* FIXME: hack for hidden WiFi becuase clients didn't consistently
|
||||
* set the 'hidden' property to indicate hidden SSID networks. If
|
||||
* activating but the network isn't available let the device recheck
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ GPtrArray *nm_device_get_available_connections (NMDevice *device,
|
|||
|
||||
gboolean nm_device_connection_is_available (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
gboolean allow_device_override);
|
||||
gboolean for_user_activation_request);
|
||||
|
||||
gboolean nm_device_notify_component_added (NMDevice *device, GObject *component);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue