Skip to content

Commit

Permalink
libosdp: fix bug in MAC add/check for SCS_15
Browse files Browse the repository at this point in the history
  • Loading branch information
sidcha committed Dec 23, 2019
1 parent a96a41a commit 29f2971
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osdp_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int phy_build_packet_tail(struct osdp_pd *p, uint8_t * buf, int len, int maxlen)

if (isset_flag(p, PD_FLAG_SC_ACTIVE) &&
pkt->control & PKT_CONTROL_SCB &&
pkt->data[1] > SCS_15)
pkt->data[1] >= SCS_15)
{
if (pkt->data[1] == SCS_17 || pkt->data[1] == SCS_18) {
/**
Expand Down Expand Up @@ -309,7 +309,7 @@ int phy_decode_packet(struct osdp_pd *p, uint8_t * buf, int len)

if (isset_flag(p, PD_FLAG_SC_ACTIVE) &&
pkt->control & PKT_CONTROL_SCB &&
pkt->data[1] > SCS_15)
pkt->data[1] >= SCS_15)
{
/* validate MAC */
is_cmd = isset_flag(p, PD_FLAG_PD_MODE);
Expand Down

0 comments on commit 29f2971

Please sign in to comment.