Skip to content
Snippets Groups Projects
Commit 00bab087 authored by Adrien Béraud's avatar Adrien Béraud Committed by gerrit2
Browse files

call: wait for CONNECTED state to send messages

In multi-device, we buffer outgoing messages and send them to subcalls
when their SIP session become available.
For this purpose we waited for CallState::ACTIVE which is not enough,
since ConnectionState should be CONNECTED to ensure the SIp session to
be availble.

Change-Id: I2d84fdd4b4340e9ba198f75530212e83be575920
Tuleap: #1154
parent e0cf7a66
Branches
Tags
Loading
...@@ -168,7 +168,7 @@ Call::setState(CallState call_state, ConnectionState cnx_state, signed code) ...@@ -168,7 +168,7 @@ Call::setState(CallState call_state, ConnectionState cnx_state, signed code)
pendingInMessages_.clear(); pendingInMessages_.clear();
pendingOutMessages_.clear(); pendingOutMessages_.clear();
} }
} else if (call_state == CallState::ACTIVE and not pendingOutMessages_.empty()) { } else if (call_state == CallState::ACTIVE and connectionState_ == ConnectionState::CONNECTED and not pendingOutMessages_.empty()) {
for (const auto& msg : pendingOutMessages_) for (const auto& msg : pendingOutMessages_)
sendTextMessage(msg.first, msg.second); sendTextMessage(msg.first, msg.second);
pendingOutMessages_.clear(); pendingOutMessages_.clear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment