Skip to content
Snippets Groups Projects
Commit 17e6e14b authored by Sébastien Blin's avatar Sébastien Blin
Browse files

sip: re-set interface to "default"

Before 1360c775 interface contains
"default", not an empty string. This cause the UDP transport to not
be-ing recycled and changing settings cause the SIP account to not
be re-registered correctly.
Also handle the case of empty interface, anyway it can be considered
as default.

GitLab: #826
Change-Id: I77068e44b7ea93463be2d8dec00b0da87a56370d
parent d589be69
No related branches found
No related tags found
No related merge requests found
......@@ -1959,7 +1959,7 @@ SIPAccount::createBindingAddress()
const auto& conf = config();
IpAddr ret = conf.bindAddress.empty()
? (conf.interface == ip_utils::DEFAULT_INTERFACE
? (conf.interface == ip_utils::DEFAULT_INTERFACE || conf.interface.empty()
? ip_utils::getAnyHostAddr(family)
: ip_utils::getInterfaceAddr(getLocalInterface(), family))
: IpAddr(conf.bindAddress, family);
......
......@@ -45,7 +45,7 @@ struct SipAccountConfig : public SipAccountBaseConfig {
/**
* interface name on which this account is bound
*/
std::string interface;
std::string interface {ip_utils::DEFAULT_INTERFACE};
/**
* Determine if STUN public address resolution is required to register this account. In this
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment