初始化health check module
This commit is contained in:
@@ -32,8 +32,6 @@ int health_check_session_set_status(int session_id, int is_active);
|
||||
// return -1 : key not exist
|
||||
int health_check_session_get_mac(int session_id, char *mac_buff);
|
||||
|
||||
void health_check_session_foreach();
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -52,6 +52,7 @@ char gateway_address[HC_LOCAL_ADDRESS_LEN];
|
||||
uint8_t default_gw_mac[HC_MAC_LEN];
|
||||
|
||||
static int get_mac_by_addr(char *addr, uint8_t *buf);
|
||||
static int health_check_session_foreach();
|
||||
|
||||
static struct session_iterm *health_check_get_iterm_by_id(int session_id)
|
||||
{
|
||||
@@ -266,7 +267,7 @@ static void *_health_check_session_foreach(void *arg)
|
||||
bfd_vtysh_close(&client);
|
||||
}
|
||||
|
||||
int health_check_session_foreach()
|
||||
static int health_check_session_foreach()
|
||||
{
|
||||
pthread_t pid;
|
||||
pthread_create(&pid, NULL, _health_check_session_foreach, NULL);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "sce.h"
|
||||
#include "log.h"
|
||||
#include "utils.h"
|
||||
#include "health_check.h"
|
||||
#include "global_metrics.h"
|
||||
|
||||
static void sig_handler(int signo)
|
||||
@@ -73,6 +74,8 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user