Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dcp to respond to identify all filter types #434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/common/pf_dcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ static int pf_dcp_identify_req (
uint16_t ix;
bool first = true; /* First of the blocks */
bool match = false; /* Is it for us? */
bool filter = false; /* Is it IdentifyFilter or IdentifyAll? */
bool filter = true; /* Is it IdentifyFilter or IdentifyAll? */
uint8_t * p_src;
uint16_t src_pos = 0;
pf_ethhdr_t * p_src_ethhdr;
Expand Down Expand Up @@ -1673,18 +1673,18 @@ static int pf_dcp_identify_req (
stationname_position = src_pos;
stationname_len = src_block_len;
#endif
if (
(memcmp (p_value, &p_src[src_pos], src_block_len) == 0) &&
(p_value[src_block_len] == '\0'))
if (filter == true)
{
if (first == true)
if (
(memcmp (p_value, &p_src[src_pos], src_block_len) != 0) ||
(p_value[src_block_len] != '\0'))
{
filter = true;
match = false;
}
}
else
{
match = false;
ret = -1;
}
break;
case PF_DCP_SUB_DEV_PROP_ID:
Expand Down Expand Up @@ -1837,7 +1837,6 @@ static int pf_dcp_identify_req (
if (first == true)
{
p_req_alias_name = alias;
filter = true;
}
}
else
Expand Down