Skip to content
Snippets Groups Projects
Commit 1d56ab2b authored by Olivier Dion's avatar Olivier Dion
Browse files

sipcall: Fix unitiliazed variable

Gitlab: #612
Change-Id: I923c6cf4dcbe94cdf3667717f977e21f8d1b7ce1
parent baf62dd3
Branches
No related tags found
No related merge requests found
...@@ -291,6 +291,11 @@ ip_utils::getLocalAddr(pj_uint16_t family) ...@@ -291,6 +291,11 @@ ip_utils::getLocalAddr(pj_uint16_t family)
IpAddr IpAddr
ip_utils::getInterfaceAddr(const std::string& interface, pj_uint16_t family) ip_utils::getInterfaceAddr(const std::string& interface, pj_uint16_t family)
{ {
if (AF_UNSPEC == family) {
JAMI_WARN("Unspecifcied interface family");
return {};
}
if (interface == DEFAULT_INTERFACE) if (interface == DEFAULT_INTERFACE)
return getLocalAddr(family); return getLocalAddr(family);
......
...@@ -3032,6 +3032,7 @@ SIPCall::setupIceResponse() ...@@ -3032,6 +3032,7 @@ SIPCall::setupIceResponse()
auto opt = account->getIceOptions(); auto opt = account->getIceOptions();
opt.accountPublicAddr = account->getPublishedIpAddress();
opt.accountLocalAddr = ip_utils::getInterfaceAddr(account->getLocalInterface(), opt.accountLocalAddr = ip_utils::getInterfaceAddr(account->getLocalInterface(),
opt.accountPublicAddr.getFamily()); opt.accountPublicAddr.getFamily());
...@@ -3041,8 +3042,6 @@ SIPCall::setupIceResponse() ...@@ -3041,8 +3042,6 @@ SIPCall::setupIceResponse()
return; return;
} }
opt.accountPublicAddr = account->getPublishedIpAddress();
if (not initIceMediaTransport(false, opt)) { if (not initIceMediaTransport(false, opt)) {
JAMI_ERR("[call:%s] ICE initialization failed", getCallId().c_str()); JAMI_ERR("[call:%s] ICE initialization failed", getCallId().c_str());
// Fatal condition // Fatal condition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment