Commit 4e8c7f32 authored by Stepan Salenikovich's avatar Stepan Salenikovich

daemon: re-register SIP account when credentials change

Refs #71715

Change-Id: Ie3bcb8a4e7c9118c3ff9b39209fd06e53e18fa26
parent b245bcd7
......@@ -661,8 +661,13 @@ void
setCredentials(const std::string& accountID,
const std::vector<std::map<std::string, std::string>>& details)
{
if (auto sipaccount = ring::Manager::instance().getAccount<SIPAccount>(accountID))
sipaccount->setCredentials(details);
if (auto sipaccount = ring::Manager::instance().getAccount<SIPAccount>(accountID)) {
sipaccount->doUnregister([&](bool /* transport_free */) {
sipaccount->setCredentials(details);
if (sipaccount->isEnabled())
sipaccount->doRegister();
});
}
}
} // namespace DRing
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