mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
Fix compilation + fix crash when vCards are disabled and URI is NULL + remove warning
This commit is contained in:
parent
0a697d0d6f
commit
be38b3474c
2 changed files with 10 additions and 6 deletions
|
|
@ -278,7 +278,7 @@ LinphoneAddress * linphone_friend_get_address(const LinphoneFriend *lf) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int linphone_friend_set_address(LinphoneFriend *lf, const LinphoneAddress *addr){
|
||||
int linphone_friend_set_address(LinphoneFriend *lf, const LinphoneAddress *addr) {
|
||||
LinphoneAddress *fr = linphone_address_clone(addr);
|
||||
|
||||
linphone_address_clean(fr);
|
||||
|
|
@ -715,7 +715,7 @@ void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc) {
|
|||
LinphoneAddress *addr = linphone_friend_get_address(fr);
|
||||
|
||||
if (!addr) {
|
||||
ms_warning("No sip url defined.");
|
||||
ms_debug("No sip url defined in friend %s", linphone_friend_get_name(fr));
|
||||
return;
|
||||
}
|
||||
linphone_address_unref(addr);
|
||||
|
|
@ -1332,10 +1332,14 @@ static int create_friend(void *data, int argc, char **argv, char **colName) {
|
|||
lf = linphone_friend_new_from_vcard(vcard);
|
||||
}
|
||||
if (!lf) {
|
||||
LinphoneAddress *addr = linphone_address_new(argv[2]);
|
||||
lf = linphone_friend_new();
|
||||
linphone_friend_set_address(lf, addr);
|
||||
linphone_address_unref(addr);
|
||||
if (argv[2] != NULL) {
|
||||
LinphoneAddress *addr = linphone_address_new(argv[2]);
|
||||
if (addr) {
|
||||
linphone_friend_set_address(lf, addr);
|
||||
linphone_address_unref(addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
linphone_friend_set_inc_subscribe_policy(lf, atoi(argv[3]));
|
||||
linphone_friend_send_subscribe(lf, atoi(argv[4]));
|
||||
|
|
|
|||
|
|
@ -3864,7 +3864,7 @@ extern "C" void Java_org_linphone_core_LinphoneFriendImpl_setPresenceModel(JNIEn
|
|||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneFriendImpl_isAlreadyPresentInFriendList(JNIEnv* env, jobject thiz, jlong ptr) {
|
||||
LinphoneFriend *lf = (LinphoneFriend *)ptr;
|
||||
return (jboolean)lf->friend_list != NULL;
|
||||
return lf->friend_list != NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue