Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GNBDEV committed Dec 19, 2023
1 parent e6775a8 commit 25ff341
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/cli/gnb_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void gnb_ctl_dump_address_list(gnb_ctl_block_t *ctl_block, uint32_t in_nodeid);

static void show_useage(int argc,char *argv[]){

printf("GNB Ctl version 1.4.5.a protocol version 1.2.5\n");
printf("GNB Ctl version 1.4.5.a protocol version 1.2.6\n");
printf("Build[%s %s]\n", __DATE__, __TIME__);

printf("Copyright (C) 2019 gnbdev\n");
Expand All @@ -52,7 +52,7 @@ static void show_useage(int argc,char *argv[]){
printf(" --help\n");

printf("example:\n");
printf("%s --ctl-block=./gnb.map\n",argv[0]);
printf("%s -b gnb.map -c -s\n",argv[0]);

}

Expand Down
6 changes: 3 additions & 3 deletions src/ctl/gnb_ctl_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ void gnb_ctl_dump_status(gnb_ctl_block_t *ctl_block, uint32_t in_nodeid, uint8_t
continue;
}

if ( 0 != online_opt && !((GNB_NODE_STATUS_IPV6_PONG | GNB_NODE_STATUS_IPV4_PONG) & node->udp_addr_status) && node->uuid32 != ctl_block->core_zone->local_uuid ) {
dump_all_node:

if ( 0 != online_opt && !((GNB_NODE_STATUS_IPV6_PONG | GNB_NODE_STATUS_IPV4_PONG) & node->udp_addr_status) ) {
continue;
}

dump_all_node:

available_address6_list = (gnb_address_list_t *)&node->available_address6_list3_block;
available_address4_list = (gnb_address_list_t *)&node->available_address4_list3_block;
static_address_list = (gnb_address_list_t *)&node->static_address_block;
Expand Down
8 changes: 0 additions & 8 deletions src/gnb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,18 +468,11 @@ gnb_core_t* gnb_core_create(gnb_conf_t *conf){

gnb_core->heap = heap;

/*
if ( 0 == conf->lite_mode ) {
//加载 node.conf
local_node_file_config(conf);
}
*/
init_ctl_block(gnb_core, conf);

gnb_core->conf = &gnb_core->ctl_block->conf_zone->conf_st;
memcpy(gnb_core->conf, conf, sizeof(gnb_conf_t));


gnb_core->log = &gnb_core->ctl_block->core_zone->log_ctx_st;

gnb_log_ctx_t *log = gnb_log_ctx_create();
Expand Down Expand Up @@ -577,7 +570,6 @@ gnb_core_t* gnb_core_create(gnb_conf_t *conf){

}


log_out_description(gnb_core->log);

void *memory = (void *)gnb_core->ctl_block->entry_table256;
Expand Down
2 changes: 1 addition & 1 deletion src/gnb_pf_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static void init(gnb_worker_t *gnb_worker, void *ctx){

if ( NULL == find_pf ) {
GNB_ERROR1(gnb_core->log, GNB_LOG_ID_PF, "pf_route '%s' not exist\n", gnb_core->conf->pf_route);
return;
exit(1);
}

pf = (gnb_pf_t *)gnb_heap_alloc(gnb_core->heap, sizeof(gnb_pf_t));
Expand Down
4 changes: 2 additions & 2 deletions src/gnb_primary_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,9 @@ static void init(gnb_worker_t *gnb_worker, void *ctx){

pf = gnb_find_pf_mod_by_name(gnb_core->conf->pf_route);

if ( NULL== pf ) {
if ( NULL == pf ) {
GNB_ERROR1(gnb_core->log, GNB_LOG_ID_CORE, "pf_route '%s' not exist\n", gnb_core->conf->pf_route);
return;
exit(1);
}

gnb_pf_install(primary_worker_ctx->pf_array, pf);
Expand Down

0 comments on commit 25ff341

Please sign in to comment.