tfe.conf中系统参数的section改为system,兼容kniv1测试完毕。

This commit is contained in:
zhengchao
2019-06-02 18:17:53 +08:00
parent 306dcc6ce0
commit ace31ae24a
6 changed files with 52 additions and 54 deletions

View File

@@ -41,26 +41,14 @@ struct sender_scm* sender_scm_init(const char *profile, const char *section, voi
struct sockaddr_in server_addr;
struct sender_scm *sender = ALLOC(struct sender_scm, 1);
sender->logger = logger;
int ret = MESA_load_profile_int_nodef(profile, section, "send_switch", &send_switch);
if(ret < 0)
MESA_load_profile_int_def(profile, section, "send_switch", &send_switch, 1);
if(send_switch)
{
TFE_LOG_ERROR(logger, "MESA_prof_load: send_switch not set, profile is %s, section is %s", profile, section);
goto error_out;
MESA_load_profile_string_def(profile, section, "ip", kni_ip, sizeof(kni_ip), "127.0.0.1");
MESA_load_profile_int_def(profile, section, "cmsg_port", &kni_port, 2475);
TFE_LOG_INFO(logger, "MESA_prof_load, [%s]:\n kni_ip: %s\n kni_port: %d",
section, kni_ip, kni_port);
}
ret = MESA_load_profile_string_nodef(profile, section, "kni_ip", kni_ip, sizeof(kni_ip));
if(ret < 0)
{
TFE_LOG_ERROR(logger, "MESA_prof_load: kni_ip not set, profile is %s, section is %s", profile, section);
goto error_out;
}
ret = MESA_load_profile_int_nodef(profile, section, "kni_port", &kni_port);
if(ret < 0)
{
TFE_LOG_ERROR(logger, "MESA_prof_load: kni_port not set, profile is %s, section is %s", profile, section);
goto error_out;
}
TFE_LOG_INFO(logger, "MESA_prof_load, [%s]:\n kni_ip: %s\n kni_port: %d",
section, kni_ip, kni_port);
sender->send_switch = send_switch;
if(send_switch == 0)
{