diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2022-11-18 19:24:57 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-18 14:24:57 +0200 |
commit | 53e64f0e976adf865091659b671369e2e4eabc3f (patch) | |
tree | b07a69482bcfe5739245a0eb114c808f05f96460 /aclk/aclk_query.c | |
parent | d9eb78d7d894be2b01308dbdfa4105c82bca1b26 (diff) |
minor - silence misleading error (#14013)
silence missleading error
Diffstat (limited to 'aclk/aclk_query.c')
-rw-r--r-- | aclk/aclk_query.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/aclk/aclk_query.c b/aclk/aclk_query.c index c0be4997dc..5301c281ff 100644 --- a/aclk/aclk_query.c +++ b/aclk/aclk_query.c @@ -256,7 +256,7 @@ static int send_bin_msg(struct aclk_query_thread *query_thr, aclk_query_t query) return 0; } -const char *aclk_query_get_name(aclk_query_type_t qt) +const char *aclk_query_get_name(aclk_query_type_t qt, int unknown_ok) { switch (qt) { case HTTP_API_V2: return "http_api_request_v2"; @@ -273,7 +273,8 @@ const char *aclk_query_get_name(aclk_query_type_t qt) case UPDATE_NODE_COLLECTORS: return "update_node_collectors"; case PROTO_BIN_MESSAGE: return "generic_binary_proto_message"; default: - error_report("Unknown query type used %d", (int) qt); + if (!unknown_ok) + error_report("Unknown query type used %d", (int) qt); return "unknown"; } } @@ -322,7 +323,7 @@ int aclk_query_process_msgs(struct aclk_query_thread *query_thr) static void worker_aclk_register(void) { worker_register("ACLKQUERY"); for (int i = 1; i < ACLK_QUERY_TYPE_COUNT; i++) { - worker_register_job_name(i, aclk_query_get_name(i)); + worker_register_job_name(i, aclk_query_get_name(i, 0)); } } |