Skip to content

Commit

Permalink
file: Fix bug in the exclusive flag collection
Browse files Browse the repository at this point in the history
Bit 0 of FtAction set/1 means not exclusive (interleave) and not set/0
means file transfer only/exclusive.

Related-to: #192
Fixes: 63a084e5a586ced30bf18a39d4cbf4732e2508ae
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Aug 16, 2024
1 parent 4225650 commit 99ab23f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osdp_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int osdp_file_cmd_stat_decode(struct osdp_pd *pd, uint8_t *buf, int len)
assert(f->offset + f->length <= f->size);

/* Collect control flags */
SET_FLAG_V(f, OSDP_FILE_TX_FLAG_EXCLUSIVE, stat.control & 0x01)
SET_FLAG_V(f, OSDP_FILE_TX_FLAG_EXCLUSIVE, !(stat.control & 0x01))
SET_FLAG_V(f, OSDP_FILE_TX_FLAG_PLAIN_TEXT, stat.control & 0x02)
SET_FLAG_V(f, OSDP_FILE_TX_FLAG_POLL_RESP, stat.control & 0x04)

Expand Down

0 comments on commit 99ab23f

Please sign in to comment.