forked from mirrors/linphone-iphone
Close already opened log file in liblinphone_tester when setting a new log file.
This commit is contained in:
parent
5f612d8396
commit
71caaff491
1 changed files with 3 additions and 0 deletions
|
|
@ -169,6 +169,9 @@ void liblinphone_tester_uninit(void) {
|
|||
}
|
||||
|
||||
int liblinphone_tester_set_log_file(const char *filename) {
|
||||
if (log_file) {
|
||||
fclose(log_file);
|
||||
}
|
||||
log_file = fopen(filename, "w");
|
||||
if (!log_file) {
|
||||
ms_error("Cannot open file [%s] for writing logs because [%s]", filename, strerror(errno));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue