summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2019-12-11 17:42:21 +0800
committerliuxueli <[email protected]>2019-12-11 17:42:21 +0800
commitf1e0dfa1c65717f33dbb164f915981cf8b795ef2 (patch)
treee5c3c3f3dce60d01af17a8802a665ac8d14fecc7 /src
parent81a42d845ed5536b6ef2f3d7e879b2a2cb112367 (diff)
修改读取配置文件位置,从conf/radius/radius.conf文件中获取
Diffstat (limited to 'src')
-rw-r--r--src/ntc_radius_plug.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ntc_radius_plug.cpp b/src/ntc_radius_plug.cpp
index 6661fd4..b8829a1 100644
--- a/src/ntc_radius_plug.cpp
+++ b/src/ntc_radius_plug.cpp
@@ -25,8 +25,8 @@
#include "ntc_radius_plug.h"
-static int NTC_RADIUS_PLUG_VERSION_20191206=0;
-const char *config_file="t1conf/main.conf";
+static int NTC_RADIUS_PLUG_VERSION_20191211=0;
+const char *config_file="conf/radius/radius.conf";
g_ntc_radius_plug_t g_ntc_radius_plug;
@@ -311,13 +311,13 @@ int NTC_RADIUS_PLUG_INIT(void)
rd_kafka_topic_conf_t *topic_conf;
memset(&g_ntc_radius_plug,0,sizeof(g_ntc_radius_plug_t));
- MESA_load_profile_string_def(config_file, "SYSTEM", "NIC_NAME", nic_name, sizeof(nic_name), "eth0");
- MESA_load_profile_string_def(config_file, "RADIUS","LOG_PATH",g_ntc_radius_plug.pathname, sizeof(g_ntc_radius_plug.pathname), "./t1log/ntc_radius_plug/ntc_radius_plug");
- MESA_load_profile_int_def(config_file, "RADIUS", "SERVICE_ID", &g_ntc_radius_plug.service_id, 0xA2);
- MESA_load_profile_int_def(config_file, "RADIUS","LEVEL", &g_ntc_radius_plug.level, RLOG_LV_FATAL);
- MESA_load_profile_string_def(config_file, "RADIUS", "COLLECT_TOPIC", g_ntc_radius_plug.topic_name, sizeof(g_ntc_radius_plug.topic_name), "eth0");
- MESA_load_profile_string_def(config_file, "RADIUS", "BROKERLIST", g_ntc_radius_plug.brokerlist, sizeof(g_ntc_radius_plug.brokerlist), "127.0.0.1:9092");
- MESA_load_profile_int_def(config_file, "RADIUS", "DEVICE_ID", &g_ntc_radius_plug.device_id, 0);
+ MESA_load_profile_string_def(config_file, "RADIUS_PLUG", "NIC_NAME", nic_name, sizeof(nic_name), "eth0");
+ MESA_load_profile_string_def(config_file, "RADIUS_PLUG","LOG_PATH",g_ntc_radius_plug.pathname, sizeof(g_ntc_radius_plug.pathname), "./log/ntc_radius_plug/ntc_radius_plug");
+ MESA_load_profile_int_def(config_file, "RADIUS_PLUG", "SERVICE_ID", &g_ntc_radius_plug.service_id, 0xA2);
+ MESA_load_profile_int_def(config_file, "RADIUS_PLUG","LEVEL", &g_ntc_radius_plug.level, RLOG_LV_FATAL);
+ MESA_load_profile_string_def(config_file, "RADIUS_PLUG", "COLLECT_TOPIC", g_ntc_radius_plug.topic_name, sizeof(g_ntc_radius_plug.topic_name), "RADIUS-RECORD-LOG");
+ MESA_load_profile_string_def(config_file, "RADIUS_PLUG", "BROKERLIST", g_ntc_radius_plug.brokerlist, sizeof(g_ntc_radius_plug.brokerlist), "127.0.0.1:9092");
+ MESA_load_profile_int_def(config_file, "RADIUS_PLUG", "DEVICE_ID", &g_ntc_radius_plug.device_id, 0);
g_ntc_radius_plug.logger = MESA_create_runtime_log_handle(g_ntc_radius_plug.pathname, g_ntc_radius_plug.level);
if(g_ntc_radius_plug.logger == NULL)
@@ -360,7 +360,7 @@ int NTC_RADIUS_PLUG_INIT(void)
return -1;
}
- printf("INIT NTC_RADIUS_PLUG SUCCESS, VERSION: %d\n", NTC_RADIUS_PLUG_VERSION_20191206);
+ printf("INIT NTC_RADIUS_PLUG SUCCESS, VERSION: %d\n", NTC_RADIUS_PLUG_VERSION_20191211);
return 0;
}