Skip to content

Commit

Permalink
cp: Fix typo in flag CP_REQ_OFFLINE value
Browse files Browse the repository at this point in the history
When adding CP_REQ_OFFLINE flag, the value was set to 0x01 which was
previously assigned to CP_REQ_SC_RESTART. This caused the PD to restart
secure channel instead of going offline.

The second issue is that the restart secure channel path is not guarded
by a suitable check to see if this PD can do secure channel at all.
Although we should never reach this code path in the normal flow, it's
nice to know that these code paths converge at some common point where
we check for the PD's SC capability and then proceed to restart SC. A
later patch will address this issue.

Related-to: #191
Fixes: 4225650
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Aug 17, 2024
1 parent 99ab23f commit 485870b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osdp_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ union osdp_ephemeral_data {
/* CP event requests; used with make_request() and check_request() */
#define CP_REQ_RESTART_SC 0x00000001
#define CP_REQ_EVENT_SEND 0x00000002
#define CP_REQ_OFFLINE 0x00000001
#define CP_REQ_OFFLINE 0x00000004

enum osdp_cp_phy_state_e {
OSDP_CP_PHY_STATE_IDLE,
Expand Down

0 comments on commit 485870b

Please sign in to comment.