From 605fd462c954ccb308868aecaffdeaa1dbd919ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Wed, 15 Feb 2017 15:57:23 +0100 Subject: [PATCH] Fix regression: system environment was no more used to generate the primary contact URI on first Linphone's start --- coreapi/linphonecore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 69249d7b7..18b93f047 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -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){