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 <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-07-26 22:59:21 +02:00
parent 43df0e9ae4
commit e543909afc

View file

@ -190,7 +190,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));
@ -316,7 +316,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