From 11306361e85df46ea46d67ba6bd350e11eeb1b8a Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Mon, 6 Jun 2016 16:32:40 +0200 Subject: [PATCH] Fix previous commit --- coreapi/linphonecore.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index ffe8a36d0..3908ec3b9 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -917,13 +917,11 @@ static void sound_config_read(LinphoneCore *lc) static void certificates_config_read(LinphoneCore *lc) { - const char *rootca; - - struct stat sb; - rootca=lp_config_get_string(lc->config,"sip","root_ca", NULL); + const char *rootca = lp_config_get_string(lc->config,"sip","root_ca", NULL); // If rootca is not existing anymore, we reset it to the default value if (rootca == NULL || !bctbx_file_exist(rootca)) { #ifdef __linux + struct stat sb; if (stat("/etc/ssl/certs", &sb) == 0 && S_ISDIR(sb.st_mode)) { rootca = "/etc/ssl/certs"; } else