From b0dd858d5813611683f95007399c5cbf7c884950 Mon Sep 17 00:00:00 2001 From: liuxueli Date: Wed, 6 Oct 2021 15:31:38 +0800 Subject: [PATCH] =?UTF-8?q?TSG-7957:=20tsg=5Fmaster=E5=B0=86=E9=83=A8?= =?UTF-8?q?=E5=88=86project=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9=E4=B8=BAbr?= =?UTF-8?q?idge=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_send_log.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp index c915029..c51d40e 100644 --- a/src/tsg_send_log.cpp +++ b/src/tsg_send_log.cpp @@ -171,7 +171,7 @@ static int set_tcp_isn(struct tsg_log_instance_t *_instance, struct TLD_handle_t static int set_linkinfo(struct tsg_log_instance_t *_instance, struct TLD_handle_t *_handle, struct streaminfo *a_stream) { - const char *linkinfo=(const char *)project_req_get_struct(a_stream, _instance->mac_linkinfo_project_id); + const char *linkinfo=(const char *)stream_bridge_async_data_get(a_stream, _instance->mac_linkinfo_project_id); if(linkinfo==NULL) { return 0; @@ -926,7 +926,7 @@ static int set_user_region(struct tsg_log_instance_t *_instance, struct TLD_hand int set_nat_linkinfo(struct tsg_log_instance_t *_instance, struct TLD_handle_t *_handle, struct streaminfo *a_stream, char *field_name, int project_id) { - const char *nat_linkinfo=(const char *)project_req_get_struct(a_stream, project_id); + const char *nat_linkinfo=(const char *)stream_bridge_async_data_get(a_stream, project_id); if(nat_linkinfo==NULL) { return 0; @@ -1382,24 +1382,24 @@ struct tsg_log_instance_t *tsg_sendlog_init(const char *conffile) MESA_load_profile_string_def(conffile, "TSG_LOG", "L7_UNKNOWN_NAME", _instance->l7_unknown_name, sizeof(_instance->l7_unknown_name), "UNCATEGORIZED"); MESA_load_profile_string_def(conffile, "TSG_LOG", "LINKINFO_FROM_MAC", label_buff, sizeof(label_buff), "mirror_linkinfo_from_mac"); - _instance->mac_linkinfo_project_id=project_customer_register(label_buff, PROJECT_VAL_TYPE_STRUCT); + _instance->mac_linkinfo_project_id=stream_bridge_build(label_buff, "w"); if(_instance->mac_linkinfo_project_id<0) { - MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_FATAL, "PROJECT_REGISTER", "Register %s failed.", label_buff); + MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_FATAL, "LINKINFO_FROM_MAC", "stream_bridge_build is error, app_bridge_name: %s", label_buff); } MESA_load_profile_string_def(conffile, "TSG_LOG", "NAT_C2S_LINKINFO", label_buff, sizeof(label_buff), "common_link_info_c2s"); - _instance->nat_c2s_linkinfo_project_id=project_customer_register(label_buff, PROJECT_VAL_TYPE_STRUCT); + _instance->nat_c2s_linkinfo_project_id=stream_bridge_build(label_buff, "w"); if(_instance->nat_c2s_linkinfo_project_id<0) { - MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_FATAL, "PROJECT_REGISTER", "Register %s failed.", label_buff); + MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_FATAL, "NAT_C2S_LINKINFO", "stream_bridge_build is error, app_bridge_name: %s", label_buff); } - + MESA_load_profile_string_def(conffile, "TSG_LOG", "NAT_S2C_LINKINFO", label_buff, sizeof(label_buff), "common_link_info_s2c"); - _instance->nat_s2c_linkinfo_project_id=project_customer_register(label_buff, PROJECT_VAL_TYPE_STRUCT); + _instance->nat_s2c_linkinfo_project_id=stream_bridge_build(label_buff, "w"); if(_instance->nat_s2c_linkinfo_project_id<0) { - MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_FATAL, "PROJECT_REGISTER", "Register %s failed.", label_buff); + MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_FATAL, "NAT_S2C_LINKINFO", "stream_bridge_build is error, app_bridge_name: %s", label_buff); } _instance->logger=MESA_create_runtime_log_handle(_instance->log_path, _instance->level);