Skip to content

Commit

Permalink
Return ZigBeeStatus instead of bool. Closes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Markus committed May 19, 2019
1 parent 6dca96a commit bb94a2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ZigBeeNet/ZigBeeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ private void SetBindingTable(List<BindingTable> bindingTable)
///
/// <returns><see cref="Future"> returning a <see cref="Boolean"></returns>
/// </summary>
public async Task<bool> UpdateBindingTable()
public async Task<ZigBeeStatus> UpdateBindingTable()
{
byte index = 0;
int tableSize = 0;
Expand All @@ -290,9 +290,9 @@ public async Task<bool> 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();
Expand All @@ -305,7 +305,7 @@ public async Task<bool> UpdateBindingTable()
} while (index < tableSize);

SetBindingTable(bindingTable);
return true;
return ZigBeeStatus.SUCCESS;
}

/// <summary>
Expand Down

0 comments on commit bb94a2b

Please sign in to comment.