libosdp icon indicating copy to clipboard operation
libosdp copied to clipboard

Add a in-library post command callback mechanism to perform success/failure actions

Open sidcha opened this issue 3 years ago • 0 comments

A lot of times, we need to perform some actions based on whether a command succeeded or failed. Since there are 2 level state machines (very messy) in osdp_cp.c, we have no way of performing some post success/failure operations for commands that got queued from the applications.

Note that this is not the same as command_complete_callback that exists today (which is for notifying the application). This issue is to track a in-library notifier. One prominent user case for this handler is when the application wants to set SCBK directly without a master_key; if that succeeds, LibOSDP must set the PD_FLAG_HAD_SCBK on the PD so this key can survive secure channel resets.

sidcha avatar Jun 26 '21 14:06 sidcha