Skip to content

Commit

Permalink
app/procinfo: fix _filters stats reporting
Browse files Browse the repository at this point in the history
[ upstream commit f7605e2 ]

'_filters' is compared twice, second one will be always false, removing
it using the message more relevant to the '_filters'.

Fixes: 2deb6b5 ("app/procinfo: add collectd format and host id")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
Ferruh Yigit authored and cpaelzer committed Feb 2, 2021
1 parent 579a8b4 commit 6ac70ac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/proc-info/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,9 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
} else if ((type_end != NULL) &&
(strncmp(cnt_name, "flow_", strlen("flow_"))) == 0) {
if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
strlcpy(cnt_type, "operations", cnt_type_len);
strlcpy(cnt_type, "filter_result", cnt_type_len);
else if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
strlcpy(cnt_type, "errors", cnt_type_len);
else if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
strlcpy(cnt_type, "filter_result", cnt_type_len);
} else if ((type_end != NULL) &&
(strncmp(cnt_name, "mac_", strlen("mac_"))) == 0) {
if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
Expand Down

0 comments on commit 6ac70ac

Please sign in to comment.