Fixed linphone_friend_add_address to behave like linphone_friend_set_address if there is no LinphoneAddress set yet

This commit is contained in:
Sylvain Berfini 2016-04-21 09:55:13 +02:00
parent 465559dd66
commit c2a77c9533

View file

@ -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;