From ef46ad5031c30cc4f539eb986bd5b5a07b753b44 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 26 Jul 2014 22:59:21 +0200 Subject: [PATCH] olpc: fix wrong state change reason for device NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED would map to NM_DEVICE_STATE_REASON_NOW_MANAGED. clang warns: make[6]: Entering directory `./NetworkManager/src/devices/wifi' CC nm-device-olpc-mesh.lo nm-device-olpc-mesh.c:193:28: error: implicit conversion from enumeration type 'enum NMVPNConnectionStateReason' to different enumeration type 'NMDeviceStateReason' [-Werror,-Wenum-conversion] NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ nm-device-olpc-mesh.c:319:27: error: implicit conversion from enumeration type 'enum NMVPNConnectionStateReason' to different enumeration type 'NMDeviceStateReason' [-Werror,-Wenum-conversion] NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Thomas Haller (cherry picked from commit e543909afc313416b9d8e7da82761c1470816471) --- src/devices/wifi/nm-device-olpc-mesh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/wifi/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c index 85214a7005..09b525e408 100644 --- a/src/devices/wifi/nm-device-olpc-mesh.c +++ b/src/devices/wifi/nm-device-olpc-mesh.c @@ -189,7 +189,7 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) /* FIXME: VPN stuff here is a bug; but we can't really change API now... */ nm_device_state_changed (NM_DEVICE (priv->companion), NM_DEVICE_STATE_DISCONNECTED, - NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED); + NM_DEVICE_STATE_REASON_USER_REQUESTED); nm_log_info (LOGD_OLPC, "(%s): companion %s disconnected", nm_device_get_iface (dev), nm_device_get_iface (priv->companion)); @@ -315,7 +315,7 @@ companion_state_changed_cb (NMDeviceWifi *companion, /* FIXME: VPN stuff here is a bug; but we can't really change API now... */ nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, - NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED); + NM_DEVICE_STATE_REASON_USER_REQUESTED); } static gboolean