mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
fix crash during exit() in linphonec due to log written to closed FILE
This commit is contained in:
parent
017102484d
commit
590e16569c
3 changed files with 5 additions and 9 deletions
|
|
@ -1601,7 +1601,7 @@ linphonec_proxy_add(LinphoneCore *lc)
|
|||
*/
|
||||
if ( enable_register==TRUE )
|
||||
{
|
||||
long int expires=0;
|
||||
int expires=0;
|
||||
while (1)
|
||||
{
|
||||
char *input=linphonec_readline("Specify register expiration time"
|
||||
|
|
@ -1613,13 +1613,8 @@ linphonec_proxy_add(LinphoneCore *lc)
|
|||
return;
|
||||
}
|
||||
|
||||
expires=strtol(input, (char **)NULL, 10);
|
||||
if ( expires == LONG_MIN || expires == LONG_MAX )
|
||||
{
|
||||
linphonec_out("Invalid value: %s\n", strerror(errno));
|
||||
free(input);
|
||||
continue;
|
||||
}
|
||||
expires=atoi(input);
|
||||
if (expires==0) expires=600;
|
||||
|
||||
linphone_proxy_config_set_expires(cfg, expires);
|
||||
linphonec_out("Expiration: %d seconds\n", linphone_proxy_config_get_expires (cfg));
|
||||
|
|
|
|||
|
|
@ -805,6 +805,7 @@ linphonec_finish(int exit_status)
|
|||
if (mylogfile != NULL && mylogfile != stdout)
|
||||
{
|
||||
fclose (mylogfile);
|
||||
mylogfile=stdout;
|
||||
}
|
||||
printf("\n");
|
||||
exit(exit_status);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 338398a4eee9b44dfeb2c18b735bf42cc2b9e93c
|
||||
Subproject commit 4464c094410dd4396b3563798031ed50ae90d8c8
|
||||
Loading…
Add table
Reference in a new issue