Commit 3dd52a4b authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud

call: ignore answerCall if already answered

Any client can try to answer a call multiple times. For example if dring
is running with the --auto-answer flag and the client set auto answer on
the daemon. This cause weird behavior like rotation not taken into account,
etc.

So, don't call answerCall if already answered.

Change-Id: Ibb967787aaf83e86a98fba7192810e86975304f1
parent db5abdd5
......@@ -975,6 +975,11 @@ Manager::answerCall(const std::string& call_id)
return false;
}
if (call->getConnectionState() != Call::ConnectionState::RINGING) {
// The call is already answered
return true;
}
// If ringing
stopTone();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment