From e7ef9240048ceceb767d8b13e732a2cea54c19ab Mon Sep 17 00:00:00 2001 From: zhanglianghy Date: Wed, 3 Jul 2019 10:44:56 +0800 Subject: [PATCH 1/4] =?UTF-8?q?MOD=20aaa-12=20=E5=B0=86=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=87=BD=E6=95=B0=E8=BF=9B=E8=A1=8C=E6=8A=BD?= =?UTF-8?q?=E8=B1=A1=EF=BC=8C=E4=B8=BA=E4=BB=A5=E5=90=8E=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=86=99=E6=96=87=E4=BB=B6=E5=81=9A=E5=87=86?= =?UTF-8?q?=E5=A4=87=20SOL=20=E5=B0=86=E6=96=87=E4=BB=B6=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E8=BF=9B=E8=A1=8C=E6=8A=BD=E8=B1=A1=EF=BC=8C?= =?UTF-8?q?=E4=B8=BA=E4=BB=A5=E5=90=8E=E5=85=B6=E4=BB=96=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=86=99=E6=96=87=E4=BB=B6=E5=81=9A=E5=87=86=E5=A4=87=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=EF=BC=9Azhangliang=20=E6=A3=80?= =?UTF-8?q?=E8=A7=86=E4=BA=BA=EF=BC=9Azhangliang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configm/config-server/include/parsefile.h | 4 +- .../configm/config-server/ipconfig/ipconfig.c | 8 +- .../config-server/ipconfig/parsefile.c | 460 +++++------------- 3 files changed, 134 insertions(+), 338 deletions(-) diff --git a/Platform/user/configm/config-server/include/parsefile.h b/Platform/user/configm/config-server/include/parsefile.h index 8ddfb80ad..caa1c5888 100644 --- a/Platform/user/configm/config-server/include/parsefile.h +++ b/Platform/user/configm/config-server/include/parsefile.h @@ -4,7 +4,7 @@ #define IFCONFIG_PATH "/etc/network/interfaces" #define IF_BUFF_LEN 128 -void set_if_config(char *if_name, char *conf_name, char *conf_buff); -void del_if_config(char *if_name, char *conf_buff); +void ip_conf_file_set(char *if_name, char *conf_name, char *conf_buff); +void ip_conf_file_del(char *if_name, char *conf_buff); #endif diff --git a/Platform/user/configm/config-server/ipconfig/ipconfig.c b/Platform/user/configm/config-server/ipconfig/ipconfig.c index 2eea25030..b52141baa 100644 --- a/Platform/user/configm/config-server/ipconfig/ipconfig.c +++ b/Platform/user/configm/config-server/ipconfig/ipconfig.c @@ -51,13 +51,13 @@ void ip_save_file(ip_config_t *ip_conf, uint config_type) sprintf(mask_buff, "netmask %s\n", inet_ntoa(netmask)); rpc_log_info("%s %s",addr_buff, mask_buff); - set_if_config(ip_conf->ifname, addr_name, addr_buff); - set_if_config(ip_conf->ifname, mask_name, mask_buff); + ip_conf_file_set(ip_conf->ifname, addr_name, addr_buff); + ip_conf_file_set(ip_conf->ifname, mask_name, mask_buff); } else if(config_type == CM_CONFIG_DEL) { - del_if_config(ip_conf->ifname, addr_name); - del_if_config(ip_conf->ifname, mask_name); + ip_conf_file_del(ip_conf->ifname, addr_name); + ip_conf_file_del(ip_conf->ifname, mask_name); } } diff --git a/Platform/user/configm/config-server/ipconfig/parsefile.c b/Platform/user/configm/config-server/ipconfig/parsefile.c index e683b4ac8..3c09ac66d 100644 --- a/Platform/user/configm/config-server/ipconfig/parsefile.c +++ b/Platform/user/configm/config-server/ipconfig/parsefile.c @@ -9,292 +9,82 @@ #include "parsefile.h" #include "rpc.h" -#if 0 -/* - *从配置文件中读取相应的值 - *输入参数:1,配置文件路径 2,匹配标记 3,输出存储空间 - *并且排除了空行,“=”前后无内容,无“=”的情况 - */ -void read_config(char *conf_path,char *conf_name,char *config_buff) +/* 缓存字符串保存到配置文件中 */ +int conf_file_write(char *conf_path, char *sum_buf) { - char config_linebuf[256]; - char line_name[40]; - char exchange_buf[256]; - char *config_sign = "="; - char *leave_line; - FILE *f; - f = fopen(conf_path,"r"); - if(f == NULL) - { - printf("OPEN CONFIG FALID/n"); - return 0; - } - fseek(f,0,SEEK_SET); - while(fgets(config_linebuf,256,f) != NULL) - { - if(strlen(config_linebuf) < 3) //判断是否是空行 - { - continue; - } - if (config_linebuf[strlen(config_linebuf)-1] == 10) //去除最后一位是/n的情况 - { - - memset(exchange_buf,0,sizeof(exchange_buf)); - strncpy(exchange_buf,config_linebuf,strlen(config_linebuf)-1); - memset(config_linebuf,0,sizeof(config_linebuf)); - strcpy(config_linebuf,exchange_buf); - } - memset(line_name,0,sizeof(line_name)); - leave_line = strstr(config_linebuf,config_sign); - if(leave_line == NULL) //去除无"="的情况 - { - continue; - } - int leave_num = leave_line - config_linebuf; - strncpy(line_name,config_linebuf,leave_num); - if(strcmp(line_name,conf_name) ==0) - { - strncpy(config_buff,config_linebuf+(leave_num+1),strlen(config_linebuf)-leave_num-1); - break; - } - if(fgetc(f)==EOF) - { - break; - } - fseek(f,-1,SEEK_CUR); - memset(config_linebuf,0,sizeof(config_linebuf)); - } - fclose(f); -} - -/* - *添加修改文件(当配置文件中存在标记字段,则进行修改,若不存在则进行添加) - * - *输入参数:1,配置文件路径 2,匹配标记 3,替换或添加的内容 - * - */ -void add_set_config(char *conf_path,char *conf_name,char *config_buff) -{ - - char config_linebuf[256]; - char line_name[40]; - char *config_sign = "="; - char *leave_line; - int alter_sign = 0; - - FILE *f; - f = fopen(conf_path,"r+"); - if(f == NULL) - { - printf("OPEN CONFIG FALID/n"); - return 0; - } - fseek(f,0,SEEK_END); - long congig_lenth = ftell(f); - int configbuf_lenth = strlen(config_buff); - configbuf_lenth = configbuf_lenth + 5; - char sum_buf[congig_lenth+configbuf_lenth]; - memset(sum_buf,0,sizeof(sum_buf)); - fseek(f,0,SEEK_SET); - while(fgets(config_linebuf,256,f) != NULL) - { - if(strlen(config_linebuf) < 3) //判断是否是空行 - { - strcat(sum_buf,config_linebuf); - continue; - } - leave_line = NULL; - leave_line = strstr(config_linebuf,config_sign); - if(leave_line == NULL) //去除无"="的情况 - { - strcat(sum_buf,config_linebuf); - continue; - } - int leave_num = leave_line - config_linebuf; - memset(line_name,0,sizeof(line_name)); - strncpy(line_name,config_linebuf,leave_num); - if(strcmp(line_name,conf_name) ==0) - { - strcat(sum_buf,config_buff); - strcat(sum_buf,"/n"); - alter_sign = 1; - } - else - { - strcat(sum_buf,config_linebuf); - } - if(fgetc(f)==EOF) - { - break; - } - fseek(f,-1,SEEK_CUR); - memset(config_linebuf,0,sizeof(config_linebuf)); - } - if(alter_sign == 0) - { - strcat(sum_buf,config_buff); - strcat(sum_buf,"/n"); - } - printf("---sum_buf---->%s<----------/n",sum_buf); - remove(conf_path); - fclose(f); FILE *fp; fp = fopen(conf_path,"w+"); if(fp == NULL) - { - printf("OPEN CONFIG FALID/n"); - return 2; - } - fseek(fp,0,SEEK_SET); - fputs(sum_buf,fp); - fclose(fp); -} -/* - *删除配置文件内容 - * - *输入参数:1,匹配标记 - * - */ -void del_if_config(char *conf_name) -{ - char *conf_path = "/etc/network/interface"; - char config_linebuf[256]; - char line_name[40]; - char *config_sign = "="; - char *leave_line; - - FILE *f; - f = fopen(conf_path,"r+"); - if(f == NULL) - { - printf("OPEN CONFIG FALID/n"); - return 0; - } - fseek(f,0,SEEK_END); - long congig_lenth = ftell(f); - char sum_buf[congig_lenth+2]; - memset(sum_buf,0,sizeof(sum_buf)); - fseek(f,0,SEEK_SET); - while(fgets(config_linebuf,256,f) != NULL) - { - if(strlen(config_linebuf) < 3) //判断是否是空行 - { - strcat(sum_buf,config_linebuf); - continue; - } - leave_line = NULL; - leave_line = strstr(config_linebuf,config_sign); - if(leave_line == NULL) //去除无"="的情况 - { - strcat(sum_buf,config_linebuf); - continue; - } - int leave_num = leave_line - config_linebuf; - memset(line_name,0,sizeof(line_name)); - strncpy(line_name,config_linebuf,leave_num); - if(strcmp(line_name,conf_name) !=0) - { - strcat(sum_buf,config_linebuf); - } - - if(fgetc(f)==EOF) - { - break; - } - fseek(f,-1,SEEK_CUR); - memset(config_linebuf,0,sizeof(config_linebuf)); - } - printf("---sum_buf---->%s<----------/n",sum_buf); - remove(conf_path); - fclose(f); - FILE *fp; - fp = fopen(conf_path,"w+"); - if(fp == NULL) - { - printf("OPEN CONFIG FALID/n"); - return 2; - } - fseek(fp,0,SEEK_SET); - fputs(sum_buf,fp); - fclose(fp); -} - -#endif - -/* - *添加修改文件(当配置文件中存在标记字段,则进行修改,若不存在则进行添加) - * - *输入参数:1,接口名 2,匹配标记 3,替换或添加的内容 - * - */ - -void set_if_config(char *if_name, char *conf_name, char *conf_buff) -{ - char *conf_path = IFCONFIG_PATH; - char config_linebuf[IF_BUFF_LEN]; - char static_name[IF_BUFF_LEN] = {0}; - char iface_str[IF_BUFF_LEN] = {0}; - char auto_str[IF_BUFF_LEN] = {0}; - char *auto_line = NULL; - char *iface_line = NULL; - char *config_line = NULL; - boolean next_flag = FALSE; - - FILE *f; - f = fopen(conf_path,"r+"); - if(f == NULL) { rpc_log_error("OPEN CONFIG FALID\n"); - return; + return RET_ERR; + } + fseek(fp,0,SEEK_SET); + fputs(sum_buf,fp); + fclose(fp); + + return RET_OK; +} + +/* 设置指定配置块中的配置 */ +int conf_value_in_block_set(char *conf_path, + char *start_str, char *end_str, + char *conf_name, char *conf_buff) +{ + char config_linebuf[IF_BUFF_LEN]; + int configbuf_lenth = strlen(conf_buff) + 5; + long config_lenth = 0; + boolean next_flag = FALSE; + char *start_line = NULL; + char *config_line = NULL; + FILE *f; + + f = fopen(conf_path,"r+"); + if(f == NULL) + { + rpc_log_error("OPEN CONFIG %s FALID\n", conf_path); + return RET_ERR; } - fseek(f,0,SEEK_END); + fseek(f, 0, SEEK_END); + + config_lenth = ftell(f); - long config_lenth = ftell(f); - int configbuf_lenth = strlen(conf_buff); - configbuf_lenth = configbuf_lenth + 5; char sum_buf[config_lenth + configbuf_lenth]; - memset(sum_buf,0,sizeof(sum_buf)); - fseek(f,0,SEEK_SET); + memset(sum_buf, 0, sizeof(sum_buf)); - sprintf(auto_str, "auto %s", if_name); - sprintf(iface_str, "iface %s inet", if_name); - sprintf(static_name, "iface %s inet static\n", if_name); - - memset(config_linebuf,0,sizeof(config_linebuf)); - - while(fgets(config_linebuf,IF_BUFF_LEN,f) != NULL) + fseek(f, 0, SEEK_SET); + + memset(config_linebuf, 0, sizeof(config_linebuf)); + + while(fgets(config_linebuf, IF_BUFF_LEN, f) != NULL) { /* 该做的事情已经做完 */ if(next_flag == TRUE) { - strcat(sum_buf,config_linebuf); + strcat(sum_buf, config_linebuf); goto next_while; } /* 判断是否是空行 */ if(strlen(config_linebuf) < 3) { - strcat(sum_buf,config_linebuf); + strcat(sum_buf, config_linebuf); goto next_while; } - /* 没有找到接口配置块,则继续循环 */ - if(auto_line == NULL) + /* 没有找到配置块,则继续循环 */ + if(start_line == NULL) { - auto_line = strstr(config_linebuf, auto_str); + start_line = strstr(config_linebuf, start_str); strcat(sum_buf, config_linebuf); goto next_while; } - /* 已经是下一个接口了*/ - if(strstr(config_linebuf, "auto")) + /* 配置块结束 */ + if(strstr(config_linebuf, end_str)) { - if(iface_line == NULL) - { - strcat(sum_buf, static_name); - } if(config_line == NULL) { strcat(sum_buf, conf_buff); @@ -305,22 +95,12 @@ void set_if_config(char *if_name, char *conf_name, char *conf_buff) goto next_while; } - - /* 找到接口IP配置方式 */ - if(iface_line == NULL) - { - iface_line = strstr(config_linebuf, iface_str); - if(iface_line) - { - strcat(sum_buf, static_name); - goto next_while; - } - } - /* 找到配置行 */ if(config_line == NULL) { config_line = strstr(config_linebuf, conf_name); + + /* 找到配置行 */ if(config_line) { next_flag = TRUE; @@ -341,112 +121,94 @@ next_while: memset(config_linebuf, 0, sizeof(config_linebuf)); } - + + /* 整个配置块都没有,则新创建该配置块 */ if( next_flag == FALSE ) { - if(auto_line == NULL) + if(start_line == NULL) { - strcat(sum_buf, auto_str); + strcat(sum_buf, start_str); strcat(sum_buf, "\n"); } - if(iface_line == NULL) - { - strcat(sum_buf, static_name); - } - if(config_line == NULL) { strcat(sum_buf, conf_buff); } } - - rpc_log_dbg("---sum_buf---->%s<----------\n",sum_buf); + remove(conf_path); fclose(f); - FILE *fp; - fp = fopen(conf_path,"w+"); - if(fp == NULL) - { - rpc_log_error("OPEN CONFIG FALID\n"); - return; - } - fseek(fp,0,SEEK_SET); - fputs(sum_buf,fp); - fclose(fp); - - return; + rpc_log_dbg("---sum_buf---->%s<----------\n",sum_buf); + + return conf_file_write(conf_path, sum_buf); } - -/* - *删除配置文件内容 - * - *输入参数:1,匹配标记 - * - */ -void del_if_config(char *if_name, char *conf_buff) +/* 删除指定配置块中的配置 */ +int conf_value_in_block_del(char *conf_path, char *start_str, + char *end_str, char *conf_buff) { - char *conf_path = IFCONFIG_PATH; char config_linebuf[IF_BUFF_LEN]; - char auto_str[IF_BUFF_LEN] = {0}; + int configbuf_lenth = strlen(conf_buff) + 5; + long congig_lenth = 0; + boolean next_flag = FALSE; - char *auto_line = NULL; - FILE *f; - f = fopen(conf_path,"r+"); + char *start_line = NULL; + FILE *f = fopen(conf_path, "r+"); + if(f == NULL) { printf("OPEN CONFIG FALID\n"); - return; + return RET_ERR; } - fseek(f,0,SEEK_END); + fseek(f, 0, SEEK_END); - long congig_lenth = ftell(f); - int configbuf_lenth = strlen(conf_buff); - configbuf_lenth = configbuf_lenth + 5; - char sum_buf[congig_lenth+configbuf_lenth]; + congig_lenth = ftell(f); - memset(sum_buf,0,sizeof(sum_buf)); - fseek(f,0,SEEK_SET); + char sum_buf[congig_lenth + configbuf_lenth]; - sprintf(auto_str, "auto %s", if_name); + memset(sum_buf, 0, sizeof(sum_buf)); + + fseek(f, 0, SEEK_SET); - while(fgets(config_linebuf,IF_BUFF_LEN,f) != NULL) + memset(config_linebuf, 0, sizeof(config_linebuf)); + + while(fgets(config_linebuf, IF_BUFF_LEN,f) != NULL) { /* 该做的事情已经做完 */ if(next_flag == TRUE) { - strcat(sum_buf,config_linebuf); + strcat(sum_buf, config_linebuf); goto next_while; } /* 判断是否是空行 */ if(strlen(config_linebuf) < 3) { - strcat(sum_buf,config_linebuf); + strcat(sum_buf, config_linebuf); goto next_while; } /* 没有找到接口配置块,则继续循环 */ - if(auto_line == NULL) + if(start_line == NULL) { - auto_line = strstr(config_linebuf, auto_str); - strcat(sum_buf,config_linebuf); + start_line = strstr(config_linebuf, start_str); + strcat(sum_buf, config_linebuf); goto next_while; } /* 已经是下一个接口了, 则表示无法找到*/ - if(strstr(config_linebuf, "auto")) + if(strstr(config_linebuf, end_str)) { - strcat(sum_buf,config_linebuf); + strcat(sum_buf, config_linebuf); next_flag = TRUE; goto next_while; } /* 找到配置行 */ - if(strstr(config_linebuf,conf_buff)) + if(strstr(config_linebuf, conf_buff)) { next_flag = TRUE; } @@ -463,23 +225,57 @@ void del_if_config(char *if_name, char *conf_buff) } fseek(f,-1,SEEK_CUR); - memset(config_linebuf,0,sizeof(config_linebuf)); + memset(config_linebuf, 0, sizeof(config_linebuf)); } - printf("---sum_buf---->%s<----------/n",sum_buf); remove(conf_path); fclose(f); - FILE *fp; - fp = fopen(conf_path,"w+"); - if(fp == NULL) - { - printf("OPEN CONFIG FALID/n"); - return; - } - fseek(fp,0,SEEK_SET); - fputs(sum_buf,fp); - fclose(fp); + rpc_log_dbg("---sum_buf---->%s<----------\n",sum_buf); + + return conf_file_write(conf_path, sum_buf); +} + + +/* + *添加修改文件(当配置文件中存在标记字段,则进行修改,若不存在则进行添加) + * + *输入参数:1,接口名 2,匹配标记 3,替换或添加的内容 + * + */ + +void ip_conf_file_set(char *if_name, char *conf_name, char *conf_buff) +{ + char auto_str[IF_BUFF_LEN] = {0}; + char iface_str[IF_BUFF_LEN] = {0}; + char static_name[IF_BUFF_LEN] = {0}; + + sprintf(auto_str, "auto %s", if_name); + sprintf(iface_str, "iface %s inet", if_name); + sprintf(static_name, "iface %s inet static\n", if_name); + + conf_value_in_block_set(IFCONFIG_PATH, auto_str, "auto", iface_str, static_name); + conf_value_in_block_set(IFCONFIG_PATH, auto_str, "auto", conf_name, conf_buff); + + return; +} + + +/* + *删除配置文件内容 + * + *输入参数:1,匹配标记 + * + */ +void ip_conf_file_del(char *if_name, char *conf_buff) +{ + char auto_str[IF_BUFF_LEN] = {0}; + + sprintf(auto_str, "auto %s", if_name); + + conf_value_in_block_del(IFCONFIG_PATH, auto_str, "auto", conf_buff); + + return; } From 9562c7dcbde5c33838976acd3a5611c08f6700d4 Mon Sep 17 00:00:00 2001 From: ChenLing Date: Wed, 3 Jul 2019 11:00:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?ADD=20=20aaa-12=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=AE=A1=E7=90=86-=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E5=90=8E=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E9=A1=B5=E9=9D=A2=E9=85=8D=E7=BD=AE=20RCA=EF=BC=9A=20?= =?UTF-8?q?SOL=EF=BC=9A=20=E4=BF=AE=E6=94=B9=E4=BA=BA=EF=BC=9Achenling=20?= =?UTF-8?q?=E6=A3=80=E8=A7=86=E4=BA=BA=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Platform/build/user.configm.Makefile | 2 +- .../configm/config-server/include/jumppage.h | 22 +++++++++++ .../config-server/jumppage_config/jumppage.c | 38 +++++++++++++++++++ .../config-server/userlock_config/userlock.c | 2 +- 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 Platform/user/configm/config-server/include/jumppage.h create mode 100644 Platform/user/configm/config-server/jumppage_config/jumppage.c diff --git a/Platform/build/user.configm.Makefile b/Platform/build/user.configm.Makefile index 6556c5bea..e7d8333bc 100755 --- a/Platform/build/user.configm.Makefile +++ b/Platform/build/user.configm.Makefile @@ -27,7 +27,7 @@ VPATH = ../user/configm/config-server # set the source file, don't used .o because of ... -COMMON_SRCS = configserver.c ipconfig/ipconfig.c ipconfig/parsefile.c authfree_config/authfree.c localportal_config/localportal.c userlock_config/userlock.c +COMMON_SRCS = configserver.c ipconfig/ipconfig.c ipconfig/parsefile.c authfree_config/authfree.c localportal_config/localportal.c userlock_config/userlock.c jumppage_config/jumppage.c # MRS Board Source Files PLAT_LINUX_SRCS = $(COMMON_SRCS) diff --git a/Platform/user/configm/config-server/include/jumppage.h b/Platform/user/configm/config-server/include/jumppage.h new file mode 100644 index 000000000..d1f5e85e8 --- /dev/null +++ b/Platform/user/configm/config-server/include/jumppage.h @@ -0,0 +1,22 @@ +#ifndef JUMPPAGE_H_ +#define JUMPPAGE_H_ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../../../../common/rpc/rpc_common.h" + + +/*系统管理模块将数据内容(URL地址)发送给web server */ +ret_code jumppage_config_proc(uint source, uint config_type, + pointer input, int input_len, + pointer output, int *output_len); + +#endif \ No newline at end of file diff --git a/Platform/user/configm/config-server/jumppage_config/jumppage.c b/Platform/user/configm/config-server/jumppage_config/jumppage.c new file mode 100644 index 000000000..d2c0459a1 --- /dev/null +++ b/Platform/user/configm/config-server/jumppage_config/jumppage.c @@ -0,0 +1,38 @@ +#include "../../../../common/rpc/rpc.h" +#include "../include/parsefile.h" +#include "../include/configm.h" +#include "../../../netlink_uapi/libnetlinku.h" +#include "../include/jumppage.h" +#include +#include "../../../../../Common/s2j/s2j.h" +#include "../../../../../Common/commuapinl.h" + +/*全局变量,存放用户跳转的页面 */ +char *jumpurl; + +/*初始化 */ +char *jumpurl = NULL; + +/*系统管理模块将数据内容(URL地址)发送给web server */ +ret_code jumppage_config_proc(uint source, uint config_type, + pointer input, int input_len, + pointer output, int *output_len) +{ + ret_code ret = RET_OK; + char *struct_jumppage; + struct_jumppage = (char *)input; + + rpc_log_info("jumppage configure: url: %s\n", + struct_jumppage); + + + /*将配置信息发送到web server */ + + + /*把本地Portal server的配置信息存入全局变量 */ + jumpurl = struct_jumppage; + + return RET_OK; +} + + diff --git a/Platform/user/configm/config-server/userlock_config/userlock.c b/Platform/user/configm/config-server/userlock_config/userlock.c index 448f20005..07a8c8556 100644 --- a/Platform/user/configm/config-server/userlock_config/userlock.c +++ b/Platform/user/configm/config-server/userlock_config/userlock.c @@ -75,7 +75,7 @@ ret_code userlock_config_proc(uint source, uint config_type, userlock_configure_t *struct_userlock; struct_userlock = (userlock_configure_t *)input; - rpc_log_info("userlock configure: 登录时间: %d 用户认证失败次数: %d 用户认证的时间范围: %d 用户锁定时间: %d\n", + rpc_log_info("userlock configure: 登录时间: %d 用户认证失败次数: %d 用户认证的时间范围: %d 用户锁定时间: %ld\n", struct_userlock->logintime, struct_userlock->failcount, struct_userlock->timehorizon, struct_userlock->locktime); From 1e978f70de0bf24ecee3e3de6974c28978cf512f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Wed, 3 Jul 2019 16:07:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?OCT=20REM:=201.=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3=E6=94=AF=E6=8C=81=E6=8B=89?= =?UTF-8?q?=E5=8F=96submodule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Readme.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 82e748ead..2866be3f0 100755 --- a/Readme.md +++ b/Readme.md @@ -40,9 +40,11 @@ ## **编译方法** #### 1. 从仓库获取最新代码 -git clone git@git.komect.net:ISG/secogateway.git +git clone --recursive git@git.komect.net:ISG/secogateway.git +git submodule update --init --recursive 或 -git pull +git submodule update --init --recursive +git pull #### 2. 安装必要软件(UBuntu) sudo ./fsl-qoriq-glibc-x86_64-fsl-toolchain-aarch64-toolchain-2.4.1.sh From e9f5a0b6be54ed7214ff8b9b40c20e1930b958a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Wed, 3 Jul 2019 16:10:23 +0800 Subject: [PATCH 4/4] =?UTF-8?q?OCT=20REM:=201.=20=20=E4=BF=AE=E6=AD=A32?= =?UTF-8?q?=E5=A4=84=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 2866be3f0..da41e82f9 100755 --- a/Readme.md +++ b/Readme.md @@ -40,10 +40,10 @@ ## **编译方法** #### 1. 从仓库获取最新代码 -git clone --recursive git@git.komect.net:ISG/secogateway.git +git clone --recursive git@git.komect.net:ISG/secogateway.git git submodule update --init --recursive 或 -git submodule update --init --recursive +git submodule update --init --recursive git pull #### 2. 安装必要软件(UBuntu)