mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-10-26 01:23:50 +00:00
Right now OpenBTS requires a port field in inbound invites. This shouldn't be the case, a lacking port should be assumed to be 5060, the SIP standard port. This patch adds this feature.
423e4c2adf
This commit is contained in:
committed by
Michael Iedema
parent
213373d433
commit
0d163d98c7
@@ -220,9 +220,12 @@ bool IPAddressSpec::ipSet(string addrSpec, const char * provenance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!resolveAddress(&mipSockAddr,addrSpec.c_str())) {
|
if (!resolveAddress(&mipSockAddr,addrSpec.c_str())) {
|
||||||
|
//try to resolve with default port if it fails without
|
||||||
|
if (!resolveAddress(&mipSockAddr,addrSpec.c_str(), 5060)) {
|
||||||
LOG(CRIT) << "cannot resolve IP address for " << addrSpec <<" from "<<provenance; // << sbText();
|
LOG(CRIT) << "cannot resolve IP address for " << addrSpec <<" from "<<provenance; // << sbText();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{ char host[256];
|
{ char host[256];
|
||||||
const char* ret = inet_ntop(AF_INET,&(mipSockAddr.sin_addr),host,255);
|
const char* ret = inet_ntop(AF_INET,&(mipSockAddr.sin_addr),host,255);
|
||||||
|
|||||||
Reference in New Issue
Block a user