Commit 605fd462 authored by François Grisez's avatar François Grisez
Browse files

Fix regression: system environment was no more used to generate the primary...

Fix regression: system environment was no more used to generate the primary contact URI on first Linphone's start
parent 8d7d1692
......@@ -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){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment