From 586fb056a6555cade149d4c7998d0c57a3db7262 Mon Sep 17 00:00:00 2001 From: luwenpeng Date: Fri, 24 Feb 2023 15:41:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9health=20check=20module?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E7=9A=84=E9=A1=BA=E5=BA=8F=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/health_check.cpp | 6 +++--- platform/src/main.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/src/health_check.cpp b/platform/src/health_check.cpp index 934c3a3..f45733a 100644 --- a/platform/src/health_check.cpp +++ b/platform/src/health_check.cpp @@ -107,7 +107,7 @@ int health_check_session_add(int session_id, const struct health_check *policy) bfd_vtysh_connect(&client); ret = bfd_vtysh_add_dev(&client, policy->address, policy->retires, policy->interval_ms); if (ret != 0) { - LOG_DEBUG("bfd vtysh add dev address [%s] failed!", policy->address); + LOG_ERROR("bfd vtysh add dev address [%s] failed!", policy->address); bfd_vtysh_close(&client); return -1; } @@ -145,7 +145,7 @@ int health_check_session_del(int session_id) bfd_vtysh_connect(&client); ret = bfd_vtysh_del_dev(&client, tmp->policy.address); if (ret != 0) { - LOG_DEBUG("bfd vtysh delete dev address [%s] failed!", tmp->policy.address); + LOG_ERROR("bfd vtysh delete dev address [%s] failed!", tmp->policy.address); bfd_vtysh_close(&client); return -1; } @@ -221,7 +221,7 @@ static int get_mac_by_addr(char *addr, uint8_t *buf) saved_errno = errno; ret = ioctl(sfd, SIOCGARP, &arp_req); if (ret < 0) { - LOG_DEBUG("Get ARP entry failed : %s\n", strerror(errno)); + LOG_ERROR("Get ARP entry failed : %s\n", strerror(errno)); return -1; } errno = saved_errno; diff --git a/platform/src/main.cpp b/platform/src/main.cpp index 9bdea62..36d4000 100644 --- a/platform/src/main.cpp +++ b/platform/src/main.cpp @@ -67,6 +67,8 @@ int main(int argc, char **argv) return -1; } + health_check_session_init(profile); + struct sce_ctx *ctx = sce_ctx_create(profile); if (ctx == NULL) { @@ -74,8 +76,6 @@ int main(int argc, char **argv) return -1; } - health_check_session_init(profile); - for (int i = 0; i < ctx->nr_worker_threads; i++) { ctx->work_threads[i].tid = 0;