Skip to content

Commit

Permalink
Merge pull request #16 from AkilKhan/master
Browse files Browse the repository at this point in the history
Destination node ID checking
  • Loading branch information
pavel-kirienko committed Mar 15, 2016
2 parents f42f775 + 4a440ef commit 34195e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/canard.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ void canardHandleRxFrame(CanardInstance* ins, const CanardCANFrame* frame, uint6
uint16_t data_type_id = canardDataType(frame->id);
uint32_t transfer_descriptor = CANARD_MAKE_TRANSFER_DESCRIPTOR(data_type_id, transfer_type, source_node_id,
destination_node_id);

if(transfer_type != CanardTransferTypeBroadcast && destination_node_id != canardGetLocalNodeID(ins))
{
return;
}

CanardRxState* rxstate = NULL;
unsigned char tail_byte = frame->data[frame->data_len - 1];
Expand Down

0 comments on commit 34195e7

Please sign in to comment.