mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 14:18:07 +00:00
fix big crash in linphone_core_get_or_create_chat_room()
This commit is contained in:
parent
5cfb2710b1
commit
08d5cbbe2c
2 changed files with 13 additions and 8 deletions
|
|
@ -71,14 +71,19 @@ bool_t linphone_chat_room_matches(LinphoneChatRoom *cr, const LinphoneAddress *f
|
|||
* @return #LinphoneChatRoom where messaging can take place.
|
||||
*/
|
||||
LinphoneChatRoom* linphone_core_get_or_create_chat_room(LinphoneCore* lc, const char* to) {
|
||||
MSList* found;
|
||||
|
||||
found = ms_list_find_custom(lc->chatrooms, (MSCompareFunc) linphone_chat_room_matches, to);
|
||||
if (found != NULL) {
|
||||
return (LinphoneChatRoom*)found->data;
|
||||
} else {
|
||||
return linphone_core_create_chat_room(lc, to);
|
||||
LinphoneAddress *to_addr=linphone_core_interpret_url(lc,to);
|
||||
LinphoneChatRoom *ret;
|
||||
|
||||
if (to_addr==NULL){
|
||||
ms_error("linphone_core_get_or_create_chat_room(): Cannot make a valid address with %s",to);
|
||||
return NULL;
|
||||
}
|
||||
ret=linphone_core_get_chat_room(lc,to_addr);
|
||||
linphone_address_destroy(to_addr);
|
||||
if (!ret){
|
||||
ret=linphone_core_create_chat_room(lc,to);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5797,7 +5797,7 @@ int linphone_core_del_call( LinphoneCore *lc, LinphoneCall *call)
|
|||
}
|
||||
|
||||
/**
|
||||
* Specifiies a ring back tone to be played to far end during incoming calls.
|
||||
* Specifies a ring back tone to be played to far end during incoming calls.
|
||||
**/
|
||||
void linphone_core_set_remote_ringback_tone(LinphoneCore *lc, const char *file){
|
||||
if (lc->sound_conf.ringback_tone){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue