From c2a77c9533ec0933aef7dd02a9a8199b71cc45b9 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 21 Apr 2016 09:55:13 +0200 Subject: [PATCH] Fixed linphone_friend_add_address to behave like linphone_friend_set_address if there is no LinphoneAddress set yet --- coreapi/friend.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/coreapi/friend.c b/coreapi/friend.c index 7d0c43196..5abe5896e 100644 --- a/coreapi/friend.c +++ b/coreapi/friend.c @@ -221,6 +221,12 @@ void linphone_friend_add_address(LinphoneFriend *lf, const LinphoneAddress *addr return; } + if (lf->uri == NULL) { + LinphoneAddress *fr = linphone_address_clone(addr); + linphone_address_clean(fr); + lf->uri = fr; + } + vcard = linphone_friend_get_vcard(lf); if (!vcard) { return;