Commit 5b869f8d authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fix friends load issue when not using database

parent f90be596
......@@ -1371,15 +1371,24 @@ static void video_config_read(LinphoneCore *lc){
#endif
}
static void ui_config_read(LinphoneCore *lc)
static void read_friends_from_rc(LinphoneCore *lc)
{
#ifndef FRIENDS_SQL_STORAGE_ENABLED
LinphoneFriend *lf = NULL;
int i;
for (i = 0; (lf = linphone_friend_new_from_config_file(lc, i)) != NULL; i++) {
linphone_core_add_friend(lc, lf);
linphone_friend_unref(lf);
}
}
static void ui_config_read(LinphoneCore *lc)
{
#ifndef FRIENDS_SQL_STORAGE_ENABLED
read_friends_from_rc(lc);
#else
if (!lc->friends_db) {
read_friends_from_rc(lc);
}
#endif
call_logs_read_from_config_file(lc);
......
......@@ -993,7 +993,6 @@ static void test_presence_list_subscribe_io_error(void) {
static void simple_subscribe_with_friend_from_rc(void) {
#ifdef FIXME_SYLVAIN
LinphoneCoreManager* pauline = presence_linphone_core_manager_new("pauline");
LinphoneCoreManager *marie = presence_linphone_core_manager_new_with_rc_name("marie", "pauline_as_friend_rc");
LinphoneFriend *pauline_as_friend;
......@@ -1015,12 +1014,6 @@ static void simple_subscribe_with_friend_from_rc(void) {
BC_ASSERT_FALSE(wait_for(NULL,pauline->lc,&pauline->stat.number_of_NewSubscriptionRequest,2)); /*just to wait for unsubscription even if not notified*/
linphone_core_manager_destroy(pauline);
#else
LinphoneFriend * just_for_a_leak = linphone_friend_new();
just_for_a_leak++;
ms_error("Test not activated yet because waiting for fix");
#endif
}
......
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