mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 12:08:11 +00:00
protect chat message from being released in delivery error cb
This commit is contained in:
parent
641e9fc746
commit
39b9fcd8e7
1 changed files with 3 additions and 2 deletions
|
|
@ -316,7 +316,7 @@ static void _linphone_chat_room_send_message(LinphoneChatRoom *cr, LinphoneChatM
|
|||
char* content_type;
|
||||
const char *identity=NULL;
|
||||
time_t t=time(NULL);
|
||||
|
||||
linphone_chat_message_ref(msg);
|
||||
/* Check if we shall upload a file to a server */
|
||||
if (msg->file_transfer_information != NULL) {
|
||||
/* open a transaction with the server and send an empty request(RCS5.1 section 3.5.4.8.3.1) */
|
||||
|
|
@ -337,7 +337,7 @@ static void _linphone_chat_room_send_message(LinphoneChatRoom *cr, LinphoneChatM
|
|||
cbs.process_auth_requested=process_auth_requested;
|
||||
l=belle_http_request_listener_create_from_callbacks(&cbs,msg); /* give msg to listener to be able to start the actual file upload when server answer a 204 No content */
|
||||
belle_http_provider_send_request(cr->lc->http_provider,req,l);
|
||||
|
||||
linphone_chat_message_unref(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -388,6 +388,7 @@ static void _linphone_chat_room_send_message(LinphoneChatRoom *cr, LinphoneChatM
|
|||
}
|
||||
linphone_chat_room_delete_composing_idle_timer(cr);
|
||||
linphone_chat_room_delete_composing_refresh_timer(cr);
|
||||
linphone_chat_message_unref(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue