parent
39e7acc3fa
commit
016e8531a0
|
@ -274,6 +274,8 @@ ret_code delete_from_file(char *string)
|
|||
int length;
|
||||
char buff_line[LINE_MAX_LENGTH];
|
||||
int flag =0;
|
||||
int string_length = strlen(string);
|
||||
rpc_log_info("string length:%d\n",string_length);
|
||||
|
||||
f = fopen (STATIC_ROUTING_PATH,"r+");
|
||||
if(NULL == f)
|
||||
|
@ -294,9 +296,11 @@ ret_code delete_from_file(char *string)
|
|||
|
||||
while (fgets(buff_line, sizeof(buff_line), f) != NULL)
|
||||
{
|
||||
rpc_log_info("check buff_line:%s\n", buff_line);
|
||||
int buff_length = strlen(buff_line) - 1;
|
||||
rpc_log_info("buff_line length:%d\n",buff_length);
|
||||
rpc_log_info("buff_line:%s\n", buff_line);
|
||||
|
||||
if (strstr(buff_line, string) != NULL)
|
||||
if (strstr(buff_line, string) != NULL && (string_length == buff_length))
|
||||
{
|
||||
flag = 1;
|
||||
rpc_log_info("config info match \n");
|
||||
|
|
Loading…
Reference in New Issue