Skip to content

Commit

Permalink
cp: Fix loss of tamper bit when saving power bit in status event
Browse files Browse the repository at this point in the history
Fixes: caadc3e
Signed-off-by: Dwayne Forsyth <[email protected]>
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Aug 12, 2024
1 parent 5d14c31 commit c6ef1be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osdp_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ static int cp_decode_response(struct osdp_pd *pd, uint8_t *buf, int len)
event.status.type = OSDP_STATUS_REPORT_LOCAL;
event.status.nr_entries = 2;
event.status.mask = !!buf[pos++];
event.status.mask = !!buf[pos++] << 1;
event.status.mask |= !!buf[pos++] << 1;
memcpy(pd->ephemeral_data, &event, sizeof(event));
make_request(pd, CP_REQ_EVENT_SEND);
ret = OSDP_CP_ERR_NONE;
Expand Down

0 comments on commit c6ef1be

Please sign in to comment.