mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
Start a background task during the imdn timeout.
This commit is contained in:
parent
9c673a435c
commit
aedd2dd2c1
2 changed files with 5 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ void Imdn::startTimer () {
|
|||
timer = chatRoom->getCore()->getCCore()->sal->create_timer(timerExpired, this, duration, "imdn timeout");
|
||||
else
|
||||
belle_sip_source_set_timeout(timer, duration);
|
||||
bgTask.start(chatRoom->getCore(), 1);
|
||||
}
|
||||
|
||||
void Imdn::stopTimer () {
|
||||
|
|
@ -175,6 +176,7 @@ void Imdn::stopTimer () {
|
|||
belle_sip_object_unref(timer);
|
||||
timer = nullptr;
|
||||
}
|
||||
bgTask.stop();
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "linphone/utils/general.h"
|
||||
|
||||
#include "utils/background-task.h"
|
||||
|
||||
#include "private.h"
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -69,6 +71,7 @@ private:
|
|||
std::list<const std::shared_ptr<ChatMessage>> displayedMessages;
|
||||
std::list<MessageReason> nonDeliveredMessages;
|
||||
belle_sip_source_t *timer = nullptr;
|
||||
BackgroundTask bgTask { "IMDN sending" };
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue