Skip to content

Commit a2936ba

Browse files
Auto-merge for PR #114 via VersionBot
NetworkManager::get_state uses incorrect D-Bus type
2 parents 10e75ab + f683c78 commit a2936ba

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
44
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
55
This project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## v0.9.1 - 2018-03-06
8+
9+
* NetworkManager::get_state uses incorrect D-Bus type #114 [majorz]
10+
711
## v0.9.0 - 2018-02-15
812

913
* Error handling with error-chain #110 [majorz]

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "network-manager"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
authors = ["Zahari Petkov <zahari@resin.io>", "Aaron Brodersen <aaron@resin.io>"]
55
description = "Rust NetworkManager bindings"
66
homepage = "https://github.com/resin-io-modules/network-manager"

src/dbus_nm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl DBusNetworkManager {
5454
let response = self.dbus
5555
.call(NM_SERVICE_PATH, NM_SERVICE_INTERFACE, "state")?;
5656

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

5959
Ok(NetworkManagerState::from(state))
6060
}

src/manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ pub enum NetworkManagerState {
134134
ConnectedGlobal,
135135
}
136136

137-
impl From<i64> for NetworkManagerState {
138-
fn from(state: i64) -> Self {
137+
impl From<u32> for NetworkManagerState {
138+
fn from(state: u32) -> Self {
139139
match state {
140140
0 => NetworkManagerState::Unknown,
141141
10 => NetworkManagerState::Asleep,

0 commit comments

Comments
 (0)