TSG-8084: 使用开关(DYNAMIC_MAAT_SWITCH)控制使用静态或动态MAAT句柄扫描subscriber_id,默认使用静态MAAT句柄
This commit is contained in:
@@ -79,4 +79,5 @@
|
||||
67 TSG_FILED_GTP_IMSI virtual TSG_OBJ_IMSI --
|
||||
68 TSG_FILED_GTP_APN virtual TSG_OBJ_APN --
|
||||
69 TSG_FILED_GTP_PHONE_NUMBER virtual TSG_OBJ_PHONE_NUMBER --
|
||||
70 APP_SIGNATURE_UPDATE_PROFILE plugin {"key":1,"valid":4,"foreign":"2"}
|
||||
70 APP_SIGNATURE_UPDATE_PROFILE plugin {"key":1,"valid":4,"foreign":"2"}
|
||||
71 TSG_DYN_SUBSCRIBER_IP plugin {"key":3,"valid":5} --
|
||||
@@ -2018,10 +2018,12 @@ extern "C" int TSG_MASTER_UNLOAD()
|
||||
{
|
||||
Maat_burn_feather(g_tsg_maat_feather);
|
||||
g_tsg_maat_feather=NULL;
|
||||
|
||||
Maat_burn_feather(g_tsg_dynamic_maat_feather);
|
||||
g_tsg_dynamic_maat_feather=NULL;
|
||||
|
||||
if(g_tsg_para.dynamic_maat_switch==1)
|
||||
{
|
||||
Maat_burn_feather(g_tsg_dynamic_maat_feather);
|
||||
g_tsg_dynamic_maat_feather=NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -226,6 +226,7 @@ typedef struct tsg_para
|
||||
int level;
|
||||
short mirror_switch;
|
||||
unsigned short timeout;
|
||||
int dynamic_maat_switch;
|
||||
int app_dict_field_num;
|
||||
int device_seq_in_dc;
|
||||
int datacenter_id;
|
||||
|
||||
@@ -1700,14 +1700,23 @@ int tsg_rule_init(const char* conffile, void *logger)
|
||||
MESA_handle_runtime_log(g_tsg_para.maat_logger, RLOG_LV_FATAL, "REGISTER_TABLE", "Maat_plugin_EX_register failed, table_name: %s", g_tsg_para.table_name[TABLE_DNS_PROFILE_RECORD]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
//init dynamic maat feather
|
||||
g_tsg_dynamic_maat_feather=init_maat_feather(maat_conffile, (char *)"TSG_DYNAMIC", (char *)"DYNAMIC", logger);
|
||||
if(g_tsg_maat_feather==NULL)
|
||||
{
|
||||
MESA_handle_runtime_log(g_tsg_para.maat_logger, RLOG_LV_FATAL, "init_maat_feather failed, instance_name: %s module: %s", "TSG_DYNAMIC", "DYNAMIC");
|
||||
return -1;
|
||||
|
||||
|
||||
//init dynamic maat feather
|
||||
MESA_load_profile_int_def(conffile, "MAAT", "DYNAMIC_MAAT_SWITCH", &g_tsg_para.dynamic_maat_switch, 0);
|
||||
if(g_tsg_para.dynamic_maat_switch==1)
|
||||
{
|
||||
g_tsg_dynamic_maat_feather=init_maat_feather(maat_conffile, (char *)"TSG_DYNAMIC", (char *)"DYNAMIC", logger);
|
||||
if(g_tsg_maat_feather==NULL)
|
||||
{
|
||||
MESA_handle_runtime_log(g_tsg_para.maat_logger, RLOG_LV_FATAL, "init_maat_feather failed, instance_name: %s module: %s", "TSG_DYNAMIC", "DYNAMIC");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_tsg_dynamic_maat_feather=g_tsg_maat_feather;
|
||||
}
|
||||
|
||||
MESA_load_profile_string_def(conffile, "MAAT", "CB_SUBSCRIBER_IP_TABLE", cb_subscriber_ip_table, sizeof(cb_subscriber_ip_table), "TSG_DYN_SUBSCRIBER_IP");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user