Skip to content

Commit

Permalink
Continue normally on successful command callback on status commands
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiAmelung committed Apr 12, 2024
1 parent bd15c2b commit 86c5f6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/osdp_pd.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static int pd_decode_command(struct osdp_pd *pd, uint8_t *buf, int len)
}
cmd.id = OSDP_CMD_STATUS;
cmd.status.type = OSDP_STATUS_REPORT_LOCAL;
if (do_command_callback(pd, &cmd)) {
if (!do_command_callback(pd, &cmd)) {
break;
}
event = (struct osdp_event *)pd->ephemeral_data;
Expand All @@ -324,7 +324,7 @@ static int pd_decode_command(struct osdp_pd *pd, uint8_t *buf, int len)
}
cmd.id = OSDP_CMD_STATUS;
cmd.status.type = OSDP_STATUS_REPORT_INPUT;
if (do_command_callback(pd, &cmd)) {
if (!do_command_callback(pd, &cmd)) {
break;
}
event = (struct osdp_event *)pd->ephemeral_data;
Expand All @@ -343,7 +343,7 @@ static int pd_decode_command(struct osdp_pd *pd, uint8_t *buf, int len)
}
cmd.id = OSDP_CMD_STATUS;
cmd.status.type = OSDP_STATUS_REPORT_OUTPUT;
if (do_command_callback(pd, &cmd)) {
if (!do_command_callback(pd, &cmd)) {
break;
}
event = (struct osdp_event *)pd->ephemeral_data;
Expand All @@ -358,7 +358,7 @@ static int pd_decode_command(struct osdp_pd *pd, uint8_t *buf, int len)
}
cmd.id = OSDP_CMD_STATUS;
cmd.status.type = OSDP_STATUS_REPORT_REMOTE;
if (do_command_callback(pd, &cmd)) {
if (!do_command_callback(pd, &cmd)) {
break;
}
event = (struct osdp_event *)pd->ephemeral_data;
Expand Down

0 comments on commit 86c5f6f

Please sign in to comment.