summaryrefslogtreecommitdiff
path: root/plugin/business/doh/src/doh.cpp
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2024-07-19 18:20:04 +0800
committerluwenpeng <[email protected]>2024-07-19 18:57:57 +0800
commit2045d517cabbf7559e18367fa33b3a170143ef79 (patch)
tree15c70ad522c455c6b51622181442e12cea75f3e7 /plugin/business/doh/src/doh.cpp
parent88a7a8c5c48f681cdd0478a809652ac94c2647ee (diff)
feature: TSG-21853 Refactoring TFE Kafka infrastructure
Diffstat (limited to 'plugin/business/doh/src/doh.cpp')
-rw-r--r--plugin/business/doh/src/doh.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/business/doh/src/doh.cpp b/plugin/business/doh/src/doh.cpp
index 4103f69..15032b4 100644
--- a/plugin/business/doh/src/doh.cpp
+++ b/plugin/business/doh/src/doh.cpp
@@ -385,7 +385,7 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http
static int doh_maat_init(const char *profile, const char *section)
{
- g_doh_conf->maat = (struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT);
+ g_doh_conf->maat = tfe_get_maat_handle();
MESA_load_profile_string_def(profile, section, "table_appid", g_doh_conf->tables[TYPE_APPID].name, TFE_STRING_MAX, "ATTR_APP_ID");
MESA_load_profile_string_def(profile, section, "table_qname", g_doh_conf->tables[TYPE_QNAME].name, TFE_STRING_MAX, "ATTR_DOH_QNAME");
MESA_load_profile_string_def(profile, section, "table_host", g_doh_conf->tables[TYPE_HOST].name, TFE_STRING_MAX, "ATTR_SERVER_FQDN");
@@ -824,7 +824,7 @@ int doh_on_data(const struct tfe_stream *stream, const struct tfe_http_session *
void doh_send_metric_log(const struct tfe_stream * stream, struct doh_ctx *ctx, unsigned int thread_id)
{
size_t c2s_byte_num = 0, s2c_byte_num =0;
- struct tfe_fieldstat_metric_t *fieldstat = (struct tfe_fieldstat_metric_t *)tfe_bussiness_resouce_get(DYNAMIC_FIELDSTAT);
+ struct tfe_fieldstat_metric_t *fieldstat = tfe_get_fieldstat_handle();
fieldstat->tags[thread_id][TAG_VSYS_ID].value_int = ctx->result->vsys_id;
fieldstat->tags[thread_id][TAG_RULE_ID].value_int = ctx->result->config_id;