mirror of https://github.com/F-Stack/f-stack.git
Renaming vip6_cfg_hander() to vip6_cfg_handler()
Corrected the output of an error log as well.
This commit is contained in:
parent
1df9798077
commit
2445361818
|
@ -367,7 +367,7 @@ parse_port_slave_list(struct ff_port_cfg *cfg, const char *v_str)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vip_cfg_hander(struct ff_port_cfg *cur)
|
vip_cfg_handler(struct ff_port_cfg *cur)
|
||||||
{
|
{
|
||||||
//vip cfg
|
//vip cfg
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -375,7 +375,7 @@ vip_cfg_hander(struct ff_port_cfg *cur)
|
||||||
|
|
||||||
ret = rte_strsplit(cur->vip_addr_str, strlen(cur->vip_addr_str), &vip_addr_array[0], VIP_MAX_NUM, ';');
|
ret = rte_strsplit(cur->vip_addr_str, strlen(cur->vip_addr_str), &vip_addr_array[0], VIP_MAX_NUM, ';');
|
||||||
if (ret <= 0) {
|
if (ret <= 0) {
|
||||||
fprintf(stdout, "vip_cfg_hander nb_vip is 0, not set vip_addr or set invalid vip_addr %s\n",
|
fprintf(stdout, "vip_cfg_handler nb_vip is 0, not set vip_addr or set invalid vip_addr %s\n",
|
||||||
cur->vip_addr_str);
|
cur->vip_addr_str);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ vip_cfg_hander(struct ff_port_cfg *cur)
|
||||||
|
|
||||||
cur->vip_addr_array = (char **)calloc(cur->nb_vip, sizeof(char *));
|
cur->vip_addr_array = (char **)calloc(cur->nb_vip, sizeof(char *));
|
||||||
if (cur->vip_addr_array == NULL) {
|
if (cur->vip_addr_array == NULL) {
|
||||||
fprintf(stderr, "vip_cfg_hander malloc failed\n");
|
fprintf(stderr, "vip_cfg_handler malloc failed\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ err:
|
||||||
|
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
static int
|
static int
|
||||||
vip6_cfg_hander(struct ff_port_cfg *cur)
|
vip6_cfg_handler(struct ff_port_cfg *cur)
|
||||||
{
|
{
|
||||||
//vip6 cfg
|
//vip6 cfg
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -413,7 +413,7 @@ vip6_cfg_hander(struct ff_port_cfg *cur)
|
||||||
ret = rte_strsplit(cur->vip_addr6_str, strlen(cur->vip_addr6_str),
|
ret = rte_strsplit(cur->vip_addr6_str, strlen(cur->vip_addr6_str),
|
||||||
&vip_addr6_array[0], VIP_MAX_NUM, ';');
|
&vip_addr6_array[0], VIP_MAX_NUM, ';');
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
fprintf(stdout, "vip6_cfg_hander nb_vip6 is 0, not set vip_addr6 or set invalid vip_addr6 %s\n",
|
fprintf(stdout, "vip6_cfg_handler nb_vip6 is 0, not set vip_addr6 or set invalid vip_addr6 %s\n",
|
||||||
cur->vip_addr6_str);
|
cur->vip_addr6_str);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -422,7 +422,7 @@ vip6_cfg_hander(struct ff_port_cfg *cur)
|
||||||
|
|
||||||
cur->vip_addr6_array = (char **) calloc(cur->nb_vip6, sizeof(char *));
|
cur->vip_addr6_array = (char **) calloc(cur->nb_vip6, sizeof(char *));
|
||||||
if (cur->vip_addr6_array == NULL) {
|
if (cur->vip_addr6_array == NULL) {
|
||||||
fprintf(stderr, "port_cfg_handler malloc failed\n");
|
fprintf(stderr, "vip6_cfg_handler malloc failed\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ port_cfg_handler(struct ff_config *cfg, const char *section,
|
||||||
} else if (strcmp(name, "vip_addr") == 0) {
|
} else if (strcmp(name, "vip_addr") == 0) {
|
||||||
cur->vip_addr_str = strdup(value);
|
cur->vip_addr_str = strdup(value);
|
||||||
if (cur->vip_addr_str) {
|
if (cur->vip_addr_str) {
|
||||||
return vip_cfg_hander(cur);
|
return vip_cfg_handler(cur);
|
||||||
}
|
}
|
||||||
} else if (strcmp(name, "vip_ifname") == 0) {
|
} else if (strcmp(name, "vip_ifname") == 0) {
|
||||||
cur->vip_ifname = strdup(value);
|
cur->vip_ifname = strdup(value);
|
||||||
|
|
Loading…
Reference in New Issue