device: expose nm_device_set_autoconnect() function
This commit is contained in:
@@ -458,7 +458,7 @@ modem_prepare_result (NMModem *modem,
|
|||||||
* the device to be auto-activated anymore, which would risk locking
|
* the device to be auto-activated anymore, which would risk locking
|
||||||
* the SIM if the incorrect PIN continues to be used.
|
* the SIM if the incorrect PIN continues to be used.
|
||||||
*/
|
*/
|
||||||
g_object_set (G_OBJECT (device), NM_DEVICE_AUTOCONNECT, FALSE, NULL);
|
nm_device_set_autoconnect (device, FALSE);
|
||||||
_LOGI (LOGD_MB, "disabling autoconnect due to failed SIM PIN");
|
_LOGI (LOGD_MB, "disabling autoconnect due to failed SIM PIN");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2524,7 +2524,7 @@ nm_device_get_autoconnect (NMDevice *self)
|
|||||||
return NM_DEVICE_GET_PRIVATE (self)->autoconnect;
|
return NM_DEVICE_GET_PRIVATE (self)->autoconnect;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
nm_device_set_autoconnect (NMDevice *self, gboolean autoconnect)
|
nm_device_set_autoconnect (NMDevice *self, gboolean autoconnect)
|
||||||
{
|
{
|
||||||
NMDevicePrivate *priv;
|
NMDevicePrivate *priv;
|
||||||
|
@@ -503,6 +503,7 @@ gboolean nm_device_unrealize (NMDevice *device,
|
|||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
gboolean nm_device_get_autoconnect (NMDevice *device);
|
gboolean nm_device_get_autoconnect (NMDevice *device);
|
||||||
|
void nm_device_set_autoconnect (NMDevice *device, gboolean autoconnect);
|
||||||
|
|
||||||
void nm_device_state_changed (NMDevice *device,
|
void nm_device_state_changed (NMDevice *device,
|
||||||
NMDeviceState state,
|
NMDeviceState state,
|
||||||
|
@@ -106,7 +106,7 @@ modem_prepare_result (NMModem *modem,
|
|||||||
* the device to be auto-activated anymore, which would risk locking
|
* the device to be auto-activated anymore, which would risk locking
|
||||||
* the SIM if the incorrect PIN continues to be used.
|
* the SIM if the incorrect PIN continues to be used.
|
||||||
*/
|
*/
|
||||||
g_object_set (G_OBJECT (device), NM_DEVICE_AUTOCONNECT, FALSE, NULL);
|
nm_device_set_autoconnect (device, FALSE);
|
||||||
_LOGI (LOGD_MB, "disabling autoconnect due to failed SIM PIN");
|
_LOGI (LOGD_MB, "disabling autoconnect due to failed SIM PIN");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3795,7 +3795,7 @@ do_sleep_wake (NMManager *self, gboolean sleeping_changed)
|
|||||||
nm_device_set_enabled (device, enabled);
|
nm_device_set_enabled (device, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_set (G_OBJECT (device), NM_DEVICE_AUTOCONNECT, TRUE, NULL);
|
nm_device_set_autoconnect (device, TRUE);
|
||||||
|
|
||||||
nm_device_set_unmanaged_flags (device, NM_UNMANAGED_INTERNAL, FALSE, NM_DEVICE_STATE_REASON_NOW_MANAGED);
|
nm_device_set_unmanaged_flags (device, NM_UNMANAGED_INTERNAL, FALSE, NM_DEVICE_STATE_REASON_NOW_MANAGED);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user