mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-03 11:49:31 +00:00
Fix friends load issue when not using database
This commit is contained in:
parent
f90be596c3
commit
5b869f8d48
2 changed files with 11 additions and 9 deletions
|
|
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue