Commit da39835b authored by Guillaume Roguez's avatar Guillaume Roguez Committed by gerrit2

prevent a crash if im::sendSipMessage fails

im::sendSipMessage() may throw an exception but caller
doesn't take that into account. This may cause undefined behaviour,
like a crash on some platforms.

This patch encapsulates the im::sendSipMessage() call into a try/catch.

Change-Id: Ie07105f02d64a37a009e510bb674716ec20212c9
Tuleap: #1172
parent d2f72d61
......@@ -671,7 +671,9 @@ SIPCall::sendTextMessage(const std::map<std::string, std::string>& messages,
c->sendTextMessage(messages, from);
} else {
if (inv) {
im::sendSipMessage(inv.get(), messages);
try {
im::sendSipMessage(inv.get(), messages);
} catch (...) {}
} else {
pendingOutMessages_.emplace_back(messages, from);
RING_ERR("[call:%s] sendTextMessage: no invite session for this call", getCallId().c_str());
......
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