From bb94a2bbd9dbdd2f2b6e140638016d5d45a69908 Mon Sep 17 00:00:00 2001 From: Markus Lideck Date: Sun, 19 May 2019 09:24:06 +0200 Subject: [PATCH] Return ZigBeeStatus instead of bool. Closes #51 --- src/ZigBeeNet/ZigBeeNode.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ZigBeeNet/ZigBeeNode.cs b/src/ZigBeeNet/ZigBeeNode.cs index c7fc4c4b..d265e300 100644 --- a/src/ZigBeeNet/ZigBeeNode.cs +++ b/src/ZigBeeNet/ZigBeeNode.cs @@ -276,7 +276,7 @@ private void SetBindingTable(List bindingTable) /// /// returning a /// - public async Task UpdateBindingTable() + public async Task UpdateBindingTable() { byte index = 0; int tableSize = 0; @@ -290,9 +290,9 @@ public async Task UpdateBindingTable() CommandResult result = await _network.SendTransaction(bindingRequest, new ManagementBindRequest()); - if (result.IsError()) + if (result.IsTimeout()) { - return false; + return ZigBeeStatus.FAILURE; } ManagementBindResponse response = (ManagementBindResponse)result.GetResponse(); @@ -305,7 +305,7 @@ public async Task UpdateBindingTable() } while (index < tableSize); SetBindingTable(bindingTable); - return true; + return ZigBeeStatus.SUCCESS; } ///