Skip to content

Commit

Permalink
Merge pull request #174 from KaiAmelung/patch-1
Browse files Browse the repository at this point in the history
Continue normally on successful command callback on status commands
  • Loading branch information
sidcha committed Apr 18, 2024
2 parents 1d25d6a + a29431a commit 5f66b53
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 5f66b53

Please sign in to comment.