Skip to content

Commit

Permalink
Actually use get_manual_source_route
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Jun 5, 2024
1 parent 4c97768 commit db79392
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/ncp-uart-hw/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,22 +163,13 @@ void nc_zigbee_override_append_source_route(EmberNodeId destination,
EmberMessageBuffer *header,
bool *consumed)
{
uint8_t index = 0xFF;

for (uint8_t i = 0; i < XNCP_MANUAL_SOURCE_ROUTE_TABLE_SIZE; i++) {
if (manual_source_routes[i].active && (manual_source_routes[i].destination == destination)) {
index = i;
break;
}
}
ManualSourceRoute *route = get_manual_source_route(destination);

if (index == 0xFF) {
if (route == NULL) {
*consumed = false;
return;
}

ManualSourceRoute *route = &manual_source_routes[index];

uint8_t relay_index = 0;

*consumed = true;
Expand Down

0 comments on commit db79392

Please sign in to comment.