Skip to content

Commit 25ff341

Browse files
author
GNBDEV
committed
bug fix
1 parent e6775a8 commit 25ff341

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

src/cli/gnb_ctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void gnb_ctl_dump_address_list(gnb_ctl_block_t *ctl_block, uint32_t in_nodeid);
3636

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

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

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

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

5757
}
5858

src/ctl/gnb_ctl_dump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ void gnb_ctl_dump_status(gnb_ctl_block_t *ctl_block, uint32_t in_nodeid, uint8_t
9393
continue;
9494
}
9595

96-
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 ) {
96+
dump_all_node:
97+
98+
if ( 0 != online_opt && !((GNB_NODE_STATUS_IPV6_PONG | GNB_NODE_STATUS_IPV4_PONG) & node->udp_addr_status) ) {
9799
continue;
98100
}
99101

100-
dump_all_node:
101-
102102
available_address6_list = (gnb_address_list_t *)&node->available_address6_list3_block;
103103
available_address4_list = (gnb_address_list_t *)&node->available_address4_list3_block;
104104
static_address_list = (gnb_address_list_t *)&node->static_address_block;

src/gnb_core.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -468,18 +468,11 @@ gnb_core_t* gnb_core_create(gnb_conf_t *conf){
468468

469469
gnb_core->heap = heap;
470470

471-
/*
472-
if ( 0 == conf->lite_mode ) {
473-
//加载 node.conf
474-
local_node_file_config(conf);
475-
}
476-
*/
477471
init_ctl_block(gnb_core, conf);
478472

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

482-
483476
gnb_core->log = &gnb_core->ctl_block->core_zone->log_ctx_st;
484477

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

578571
}
579572

580-
581573
log_out_description(gnb_core->log);
582574

583575
void *memory = (void *)gnb_core->ctl_block->entry_table256;

src/gnb_pf_worker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static void init(gnb_worker_t *gnb_worker, void *ctx){
191191

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

197197
pf = (gnb_pf_t *)gnb_heap_alloc(gnb_core->heap, sizeof(gnb_pf_t));

src/gnb_primary_worker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,9 +861,9 @@ static void init(gnb_worker_t *gnb_worker, void *ctx){
861861

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

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

869869
gnb_pf_install(primary_worker_ctx->pf_array, pf);

0 commit comments

Comments
 (0)