Skip to content

Commit

Permalink
Fix labels name-only matching (netdata#17482)
Browse files Browse the repository at this point in the history
  • Loading branch information
stelfrag authored Apr 23, 2024
1 parent fbd3e48 commit 9edea61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/database/rrdlabels.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,10 @@ static SIMPLE_PATTERN_RESULT simple_pattern_match_name_only_callback(const char

// we return -1 to stop the walkthrough on first match
t->searches++;
return simple_pattern_matches_extract(t->pattern, name, NULL, 0);
SIMPLE_PATTERN_RESULT ret = simple_pattern_matches_extract(t->pattern, name, NULL, 0);
if (ret == SP_MATCHED_NEGATIVE)
ret = SP_NOT_MATCHED;
return ret;
}

static SIMPLE_PATTERN_RESULT simple_pattern_match_name_and_value_callback(const char *name, const char *value, RRDLABEL_SRC ls __maybe_unused, void *data) {
Expand Down

0 comments on commit 9edea61

Please sign in to comment.