Commit b6b4985e authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Create vCards for friends when migrating from rc to db

parent 29592e06
......@@ -1341,6 +1341,7 @@ void linphone_core_set_friends_database_path(LinphoneCore *lc, const char *path)
void linphone_core_migrate_friends_from_rc_to_db(LinphoneCore *lc) {
LpConfig *lpc = NULL;
LinphoneFriend *lf = NULL;
LinphoneFriendList *lfl = linphone_core_get_default_friend_list(lc);
int i;
ms_warning("linphone has been compiled without sqlite, can't migrate friends");
......@@ -1362,8 +1363,12 @@ void linphone_core_migrate_friends_from_rc_to_db(LinphoneCore *lc) {
for (i = 0; (lf = linphone_friend_new_from_config_file(lc, i)) != NULL; i++) {
char friend_section[32];
if (!linphone_friend_create_vcard(lf, linphone_address_get_username(linphone_friend_get_address(lf)))) {
ms_warning("Couldn't create vCard for friend %s", linphone_address_as_string(linphone_friend_get_address(lf)));
linphone_core_add_friend(lc, lf);
linphone_friend_list_add_friend(lfl, lf);
snprintf(friend_section, sizeof(friend_section), "friend_%i", i);
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