Skip to content

Commit

Permalink
libosdp: API: common: Increase PD offline status timeout to 600ms
Browse files Browse the repository at this point in the history
The current defintion of 200ms seem to be too agressive for some use
cases.

Fixes: #140
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Dec 9, 2023
1 parent 49da154 commit 068bf59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/osdp_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void osdp_get_status_mask(const osdp_t *ctx, uint8_t *bitmask)
struct osdp_pd *pd = osdp_to_pd(ctx, 0);

if (ISSET_FLAG(pd, PD_FLAG_PD_MODE)) {
*mask = osdp_millis_since(pd->tstamp) < OSDP_RESP_TOUT_MS;
*mask = osdp_millis_since(pd->tstamp) < OSDP_PD_ONLINE_TOUT_MS;
return;
}

Expand Down
1 change: 1 addition & 0 deletions src/osdp_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define OSDP_PD_SC_RETRY_MS (600 * 1000)
#define OSDP_PD_POLL_TIMEOUT_MS (50)
#define OSDP_PD_SC_TIMEOUT_MS (800)
#define OSDP_PD_ONLINE_TOUT_MS (600)
#define OSDP_RESP_TOUT_MS (200)
#define OSDP_ONLINE_RETRY_WAIT_MAX_MS (300 * 1000)
#define OSDP_CMD_RETRY_WAIT_MS (300)
Expand Down

0 comments on commit 068bf59

Please sign in to comment.