Skip to content

Commit

Permalink
Auto-merge for PR #114 via VersionBot
Browse files Browse the repository at this point in the history
NetworkManager::get_state uses incorrect D-Bus type
  • Loading branch information
resin-io-modules-versionbot[bot] authored Mar 6, 2018
2 parents 10e75ab + f683c78 commit a2936ba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).

## v0.9.1 - 2018-03-06

* NetworkManager::get_state uses incorrect D-Bus type #114 [majorz]

## v0.9.0 - 2018-02-15

* Error handling with error-chain #110 [majorz]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "network-manager"
version = "0.9.0"
version = "0.9.1"
authors = ["Zahari Petkov <zahari@resin.io>", "Aaron Brodersen <aaron@resin.io>"]
description = "Rust NetworkManager bindings"
homepage = "https://github.com/resin-io-modules/network-manager"
Expand Down
2 changes: 1 addition & 1 deletion src/dbus_nm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl DBusNetworkManager {
let response = self.dbus
.call(NM_SERVICE_PATH, NM_SERVICE_INTERFACE, "state")?;

let state: i64 = self.dbus.extract(&response)?;
let state: u32 = self.dbus.extract(&response)?;

Ok(NetworkManagerState::from(state))
}
Expand Down
4 changes: 2 additions & 2 deletions src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ pub enum NetworkManagerState {
ConnectedGlobal,
}

impl From<i64> for NetworkManagerState {
fn from(state: i64) -> Self {
impl From<u32> for NetworkManagerState {
fn from(state: u32) -> Self {
match state {
0 => NetworkManagerState::Unknown,
10 => NetworkManagerState::Asleep,
Expand Down

0 comments on commit a2936ba

Please sign in to comment.