summaryrefslogtreecommitdiff
path: root/plugin/business/doh/src
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2023-07-11 16:28:52 +0800
committerfengweihao <[email protected]>2023-07-11 16:28:52 +0800
commit2451bd795c801ac4bf961a28978fdf8a34dfcbfc (patch)
treef1769b096c84c1201e0653ed39e87511aee965bf /plugin/business/doh/src
parent868da4f642615eced38f6c5e9247fcc5be4c67cd (diff)
TSG-16056 修复deny动作,修复tsg_lua多线程调用问题和tfe编译告警v4.8.32-20230711
Diffstat (limited to 'plugin/business/doh/src')
-rw-r--r--plugin/business/doh/src/dns.cpp2
-rw-r--r--plugin/business/doh/src/doh.cpp2
-rw-r--r--plugin/business/doh/src/logger.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/plugin/business/doh/src/dns.cpp b/plugin/business/doh/src/dns.cpp
index 5db09f7..b29c42e 100644
--- a/plugin/business/doh/src/dns.cpp
+++ b/plugin/business/doh/src/dns.cpp
@@ -199,7 +199,7 @@ static void get_rr_type_nsec3(char **ptr, nsec3_t *nsec3, char *end)
}
// unused
-static int get_rr_signer(u_char **ptr, u_char *buf, int buflen, char *end)
+__attribute__((unused))static int get_rr_signer(u_char **ptr, u_char *buf, int buflen, char *end)
{
u_char *p = NULL;
int len = 0, i = 0;
diff --git a/plugin/business/doh/src/doh.cpp b/plugin/business/doh/src/doh.cpp
index bba3aab..500f577 100644
--- a/plugin/business/doh/src/doh.cpp
+++ b/plugin/business/doh/src/doh.cpp
@@ -915,9 +915,9 @@ void doh_on_end(const struct tfe_stream *stream, const struct tfe_http_session *
int ret = doh_send_log(g_doh_conf, session, stream, ctx);
if (ret > 0)
{
- doh_send_metric_log(stream, ctx, thread_id);
ATOMIC_ADD(&(g_doh_conf->stat_val[STAT_LOG_NUM]), ret);
}
+ doh_send_metric_log(stream, ctx, thread_id);
}
doh_ctx_free(ctx);
diff --git a/plugin/business/doh/src/logger.cpp b/plugin/business/doh/src/logger.cpp
index 6cb1d6b..88526de 100644
--- a/plugin/business/doh/src/logger.cpp
+++ b/plugin/business/doh/src/logger.cpp
@@ -451,7 +451,7 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c
for (size_t i = 0; i < result_num; i++)
{
- TFE_LOG_DEBUG(handle->local_logger, "URL: %s, policy_id: %d, service: %d, do_log:%d",
+ TFE_LOG_DEBUG(handle->local_logger, "URL: %s, policy_id: %lld, service: %d, do_log:%d",
http->req->req_spec.url,
result[i].config_id,
result[i].service_id,