mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
jamiaccount: move checkPendingCall in another thread to avoid potential deadlocks
Change-Id: I5e4e54f64152c6fb6c81dfc5b1c8890878d9fdd4
This commit is contained in:
@ -492,9 +492,10 @@ JamiAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::
|
||||
|
||||
auto callId = dev_call->getCallId();
|
||||
auto onNegoDone = [callId, w=weak()](bool) {
|
||||
if (auto shared = w.lock()) {
|
||||
shared->checkPendingCall(callId);
|
||||
}
|
||||
runOnMainThread([callId, w]() {
|
||||
if (auto shared = w.lock())
|
||||
shared->checkPendingCall(callId);
|
||||
});
|
||||
};
|
||||
|
||||
std::weak_ptr<SIPCall> weak_dev_call = dev_call;
|
||||
@ -2104,9 +2105,10 @@ JamiAccount::incomingCall(dht::IceCandidates&& msg, const std::shared_ptr<dht::c
|
||||
}
|
||||
auto callId = call->getCallId();
|
||||
auto onNegoDone = [callId, w=weak()](bool) {
|
||||
if (auto shared = w.lock()) {
|
||||
shared->checkPendingCall(callId);
|
||||
}
|
||||
runOnMainThread([callId, w]() {
|
||||
if (auto shared = w.lock())
|
||||
shared->checkPendingCall(callId);
|
||||
});
|
||||
};
|
||||
auto iceOptions = getIceOptions();
|
||||
iceOptions.onNegoDone = onNegoDone;
|
||||
|
Reference in New Issue
Block a user