mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 20:18:09 +00:00
Fix regression: system environment was no more used to generate the primary contact URI on first Linphone's start
This commit is contained in:
parent
8d7d1692a3
commit
605fd462c9
1 changed files with 2 additions and 2 deletions
|
|
@ -1131,11 +1131,11 @@ static void sip_config_read(LinphoneCore *lc) {
|
|||
if (tmpstr==NULL || linphone_core_set_primary_contact(lc,tmpstr)==-1) {
|
||||
const char *hostname=NULL;
|
||||
const char *username=NULL;
|
||||
#ifdef HAVE_GETENV
|
||||
#if !defined(LINPHONE_WINDOWS_UNIVERSAL) && !defined(LINPHONE_WINDOWS_PHONE) // Using getenv is forbidden on Windows 10 and Windows Phone
|
||||
hostname=getenv("HOST");
|
||||
username=getenv("USER");
|
||||
if (hostname==NULL) hostname=getenv("HOSTNAME");
|
||||
#endif /*HAVE_GETENV*/
|
||||
#endif
|
||||
if (hostname==NULL)
|
||||
hostname="unknown-host";
|
||||
if (username==NULL){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue