mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-01 02:39:22 +00:00
prevent application to perform concurrent download/upload on a single chat message by accident
This commit is contained in:
parent
258dc338dd
commit
da0cc3423b
2 changed files with 10 additions and 1 deletions
|
|
@ -491,6 +491,11 @@ int linphone_chat_room_upload_file(LinphoneChatMessage *msg) {
|
|||
belle_http_request_listener_callbacks_t cbs = {0};
|
||||
int err;
|
||||
|
||||
if (msg->http_request){
|
||||
ms_error("linphone_chat_room_upload_file(): there is already an upload in progress.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cbs.process_response = linphone_chat_message_process_response_from_post_file;
|
||||
cbs.process_io_error = linphone_chat_message_process_io_error_upload;
|
||||
cbs.process_auth_requested = linphone_chat_message_process_auth_requested_upload;
|
||||
|
|
@ -505,6 +510,10 @@ int linphone_chat_message_download_file(LinphoneChatMessage *msg) {
|
|||
belle_http_request_listener_callbacks_t cbs = {0};
|
||||
int err;
|
||||
|
||||
if (msg->http_request){
|
||||
ms_error("linphone_chat_message_download_file(): there is already a download in progress");
|
||||
return -1;
|
||||
}
|
||||
cbs.process_response_headers = linphone_chat_process_response_headers_from_get_file;
|
||||
cbs.process_response = linphone_chat_process_response_from_get_file;
|
||||
cbs.process_io_error = linphone_chat_message_process_io_error_download;
|
||||
|
|
|
|||
|
|
@ -929,7 +929,7 @@ LINPHONE_PUBLIC int linphone_call_get_stream_count(LinphoneCall *call);
|
|||
* @param call
|
||||
* @param stream_index
|
||||
*
|
||||
* @return MsAudio if stream_index = 0, MsVideo otherwise
|
||||
* @return the type (MSAudio, MSVideo, MSText) of the stream of given index.
|
||||
**/
|
||||
LINPHONE_PUBLIC MSFormatType linphone_call_get_stream_type(LinphoneCall *call, int stream_index);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue