Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:fix-wowlan into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:network-manager/xenial/1.2.2

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: f6a5e4a036008a6ff3ed5fec6c64c38f3c10de41
Merged at revision: bdd5c3d6cb38d248ccd8f4c76e834339f7a43e58
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:fix-wowlan
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:network-manager/xenial/1.2.2
Diff against target: 27 lines (+5/-4)
1 file modified
src/nm-manager.c (+5/-4)
Reviewer Review Type Date Requested Status
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+323046@code.launchpad.net

Commit message

Do not unconfigure Wo(W)LAN devices when quitting

We actually needed the reverse of the curren logic.

Description of the change

Do not unconfigure Wo(W)LAN devices when quitting

We actually needed the reverse of the curren logic.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM, given that we will add a spread test for this to master.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/nm-manager.c b/src/nm-manager.c
2index 6b1c5f6..4b6f30d 100644
3--- a/src/nm-manager.c
4+++ b/src/nm-manager.c
5@@ -841,8 +841,9 @@ remove_device (NMManager *self,
6 NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
7 gboolean unmanage = FALSE;
8
9- _LOGD (LOGD_DEVICE, "(%s): removing device (allow_unmanage %d, managed %d)",
10- nm_device_get_iface (device), allow_unmanage, nm_device_get_managed (device, FALSE));
11+ _LOGD (LOGD_DEVICE, "(%s): removing device (allow_unmanage %d, managed %d, wol %d)",
12+ nm_device_get_iface (device), allow_unmanage, nm_device_get_managed (device, FALSE),
13+ device_is_wake_on_lan (device));
14
15 if (allow_unmanage && nm_device_get_managed (device, FALSE)) {
16 NMActRequest *req = nm_device_get_act_request (device);
17@@ -854,8 +855,8 @@ remove_device (NMManager *self,
18 */
19 if (!quitting) /* Forced removal; device already gone */
20 unmanage = TRUE;
21- else if (device_is_wake_on_lan (device))
22- unmanage = TRUE;
23+ else if (device_is_wake_on_lan (device)) /* Leave configured if wo(w)lan and quitting */
24+ unmanage = FALSE;
25 else if (!nm_device_can_assume_active_connection (device))
26 unmanage = TRUE;
27 else if (!req)

Subscribers

People subscribed via source and target branches