From 2f4f6607395fead286ee0e22388e5edb54251e42 Mon Sep 17 00:00:00 2001 From: Siddharth Chandrasekaran Date: Thu, 28 May 2020 00:15:47 +0530 Subject: [PATCH] Fix wrong SCS codes sent by PD implementation phy_decode_packet() was written to be reused between CP and PD so it was doing a more relaxed check at two places that allowed this bug to escape uint and integration testing. Fixes: #7 Reported-By: GitHub-User: z8a Signed-off-by: Siddharth Chandrasekaran --- src/osdp_pd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osdp_pd.c b/src/osdp_pd.c index 0b2fd56a..3444cfd1 100644 --- a/src/osdp_pd.c +++ b/src/osdp_pd.c @@ -330,7 +330,7 @@ int pd_build_reply(struct osdp_pd *p, struct osdp_data *reply, uint8_t * pkt) if (smb && (smb[1] > SCS_14) && isset_flag(p, PD_FLAG_SC_ACTIVE)) { smb[0] = 2; - smb[1] = (len > 1) ? SCS_17 : SCS_15; + smb[1] = (len > 1) ? SCS_18 : SCS_16; } if (len == 0) {