fixes
This commit is contained in:
parent
1fd7dc5230
commit
0f0ba2c368
@ -229,6 +229,8 @@ void remove_config_file_area(int areaid) {
|
||||
}
|
||||
fgets(buffer, 256, fptr1);
|
||||
}
|
||||
fclose(fptr1);
|
||||
fclose(fptr2);
|
||||
unlink(config_file);
|
||||
rename(backup, config_file);
|
||||
}
|
||||
@ -255,6 +257,7 @@ int main(int argc, char **argv) {
|
||||
fprintf(stderr, "OUTDIR must be defined\n");
|
||||
return -1;
|
||||
}
|
||||
config_file = argv[1];
|
||||
|
||||
if (strcasecmp(argv[2], "ADD") == 0) {
|
||||
// send add control message
|
||||
|
@ -299,6 +299,8 @@ void update_config_file_area(int areaid) {
|
||||
}
|
||||
fgets(buffer, 256, fptr1);
|
||||
}
|
||||
fclose(fptr1);
|
||||
fclose(fptr2);
|
||||
unlink(config_file);
|
||||
rename(backup, config_file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user