mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
Fix huge leak in rtt callback in linphonecall + a few others in rtt tester
This commit is contained in:
parent
4a5a866cd6
commit
ecc4615b05
2 changed files with 5 additions and 3 deletions
|
|
@ -4249,6 +4249,7 @@ void linphone_call_handle_stream_events(LinphoneCall *call, int stream_index){
|
|||
} else if (evt == ORTP_EVENT_RTT_CHARACTER_RECEIVED) {
|
||||
LinphoneChatRoom * chat_room = linphone_call_get_chat_room(call);
|
||||
linphone_core_real_time_text_received(call->core, chat_room, evd->info.received_rtt_character, call);
|
||||
linphone_call_unref(chat_room->call); // linphone_call_get_chat_room(call) ref the call
|
||||
}
|
||||
ortp_event_destroy(ev);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1300,12 +1300,13 @@ static void real_time_text_message(void) {
|
|||
if (pauline_chat_room) {
|
||||
const char* message = "Lorem Ipsum Belledonnum Communicatum";
|
||||
int i;
|
||||
LinphoneChatMessage* rtt_message = linphone_chat_room_create_message(pauline_chat_room,NULL);
|
||||
LinphoneChatMessage* rtt_message = linphone_chat_room_create_message(pauline_chat_room,NULL);
|
||||
LinphoneChatRoom *marie_chat_room = linphone_call_get_chat_room(marie_call);
|
||||
|
||||
for (i = 0; i < strlen(message); i++) {
|
||||
linphone_chat_message_put_char(rtt_message,message[i]);
|
||||
linphone_chat_message_put_char(rtt_message, message[i]);
|
||||
BC_ASSERT_TRUE(wait_for_until(pauline->lc, marie->lc, &marie->stat.number_of_LinphoneIsComposingActiveReceived, i+1, 1000));
|
||||
BC_ASSERT_EQUAL(linphone_chat_room_get_char(linphone_call_get_chat_room(marie_call)), message[i], char, "%c");
|
||||
BC_ASSERT_EQUAL(linphone_chat_room_get_char(marie_chat_room), message[i], char, "%c");
|
||||
}
|
||||
|
||||
/*Commit the message, triggers a NEW LINE in T.140 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue