From c7c6f5b25f02f2532e913182ecad864da59144fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=AE=A3=E6=AD=A3?= Date: Wed, 7 Jul 2021 14:18:23 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(src):=20=E4=BF=AE=E6=94=B9fs2?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E5=85=B6=E4=B8=80=E7=9B=B4=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=B9=B6rewrite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hos_client.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/hos_client.cpp b/src/hos_client.cpp index 7157501d..0e9c41eb 100644 --- a/src/hos_client.cpp +++ b/src/hos_client.cpp @@ -392,7 +392,6 @@ static screen_stat_handle_t hos_init_fs2(char *app_name, int app_name_size) { FS_set_para(fs2_handle, OUTPUT_DEVICE, hos_conf->fs2_path, strlen(hos_conf->fs2_path) + 1); } - value = 2; FS_set_para(fs2_handle, PRINT_MODE, &value, sizeof(value)); value = 1; FS_set_para(fs2_handle, CREATE_THREAD, &value, sizeof(value)); @@ -599,8 +598,8 @@ hos_instance hos_init_instance(const char *conf_path, const char *module, size_t MESA_load_profile_uint_def(conf_path, module, "hos_poolsize", &hos_conf->pool_thread_size, 0); MESA_load_profile_uint_def(conf_path, module, "hos_cache_size", &hos_conf->cache_size, 102400); MESA_load_profile_uint_def(conf_path, module, "hos_cache_count", &hos_conf->cache_count, 10); - MESA_load_profile_string_nodef(conf_path, module, "hos_fs2_serverip", hos_conf->fs2_ip, INET6_ADDRSTRLEN); - MESA_load_profile_uint_nodef(conf_path, module, "hos_fs2_serverport", &hos_conf->fs2_port); + MESA_load_profile_string_def(conf_path, module, "hos_fs2_serverip", hos_conf->fs2_ip, INET6_ADDRSTRLEN, "127.0.0.1"); + MESA_load_profile_uint_def(conf_path, module, "hos_fs2_serverport", &hos_conf->fs2_port, 10086); MESA_load_profile_string_def(conf_path, module, "hos_fs2_path", hos_conf->fs2_path, sizeof(hos_conf->fs2_path), "./hos_fs2.stat"); MESA_load_profile_uint_def(conf_path, module, "hos_fs2_format", &hos_conf->fs2_fmt, 0); MESA_load_profile_uint_def(conf_path, module, "hos_request_num", &hos_conf->max_request_num, 100); @@ -631,14 +630,7 @@ hos_instance hos_init_instance(const char *conf_path, const char *module, size_t return &g_hos_instance; } MESA_HANDLE_RUNTIME_LOG(g_hos_handle.log, RLOG_LV_DEBUG, __FUNCTION__, "debug:%s","Instance init completed"); - if (strlen(hos_conf->fs2_ip) && hos_conf->fs2_port) - { - hos_expand_fs2(); - } - else - { - MESA_HANDLE_RUNTIME_LOG(g_hos_handle.log, RLOG_LV_DEBUG, __FUNCTION__,"error: hos fs2 function not starup"); - } + hos_expand_fs2(); g_hos_instance.error_code = 0; g_hos_instance.error_message[0]='\0'; g_hos_instance.hos_url_prefix = (const char *)calloc(1, strlen(hos_url) + 1);