Skip to content

Commit

Permalink
mgmt/osdp: pd: Fix device capabilities report
Browse files Browse the repository at this point in the history
Do not check or send the first entry in the pd->cp[] device capability
table which is for function code 0 which is not a defined function code.

Signed-off-by: David Vucich <[email protected]>
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha authored and stephanosio committed Jan 27, 2023
1 parent 39bf126 commit 4386dc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/mgmt/osdp/src/osdp_pd.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ static int pd_build_reply(struct osdp_pd *pd, uint8_t *buf, int max_len)
case REPLY_PDCAP:
assert_buf_len(REPLY_PDCAP_LEN, max_len);
buf[len++] = pd->reply_id;
for (i = 0; i < OSDP_PD_CAP_SENTINEL; i++) {
for (i = 1; i < OSDP_PD_CAP_SENTINEL; i++) {
if (pd->cap[i].function_code != i) {
continue;
}
Expand Down

0 comments on commit 4386dc3

Please sign in to comment.