mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
FileTransferDelegate: stop reffing / unreffing chat messages in file transfer, this is not needed
This commit is contained in:
parent
6c94676b44
commit
238559c273
1 changed files with 2 additions and 6 deletions
|
|
@ -68,7 +68,6 @@ static void linphone_iphone_file_transfer_recv(LinphoneChatMessage *message, con
|
|||
forKey:@"localimage"
|
||||
inMessage:message];
|
||||
}
|
||||
linphone_chat_message_unref(thiz.message);
|
||||
thiz.message = NULL;
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:kLinphoneFileTransferRecvUpdate
|
||||
|
|
@ -122,8 +121,7 @@ static LinphoneBuffer *linphone_iphone_file_transfer_send(LinphoneChatMessage *m
|
|||
|
||||
// this is the last time we will be notified, so destroy ourselve
|
||||
if (remaining <= size) {
|
||||
LOGI(@"Upload ended, unreffing %p", thiz.message);
|
||||
linphone_chat_message_unref(thiz.message);
|
||||
LOGI(@"Upload ended");
|
||||
thiz.message = NULL;
|
||||
[thiz stopAndDestroy];
|
||||
}
|
||||
|
|
@ -168,9 +166,7 @@ static LinphoneBuffer *linphone_iphone_file_transfer_send(LinphoneChatMessage *m
|
|||
[[[LinphoneManager instance] fileTransferDelegates] addObject:self];
|
||||
|
||||
_message = message;
|
||||
// we need to keep a ref on the message to continue downloading even if user quit a chatroom which destroy all chat
|
||||
// messages
|
||||
linphone_chat_message_ref(_message);
|
||||
|
||||
const char *url = linphone_chat_message_get_external_body_url(_message);
|
||||
LOGI(@"%p Downloading content in %p from %s", self, message, url);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue