mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 03:58:08 +00:00
fix cast build crash
This commit is contained in:
parent
1896eff9fe
commit
94a51d3ec1
1 changed files with 2 additions and 1 deletions
|
|
@ -926,7 +926,8 @@ int MediaSessionPrivate::selectFixedPort (int streamIndex, pair<int, int> portRa
|
|||
int MediaSessionPrivate::selectRandomPort (int streamIndex, pair<int, int> portRange) {
|
||||
for (int nbTries = 0; nbTries < 100; nbTries++) {
|
||||
bool alreadyUsed = false;
|
||||
int triedPort = static_cast<int>((ortp_random() % (portRange.second - portRange.first) + portRange.first) & ~0x1);
|
||||
unsigned int mask = 1;
|
||||
int triedPort = static_cast<int>((ortp_random() % static_cast<unsigned int>((portRange.second - portRange.first) + portRange.first)) & ~mask);
|
||||
if (triedPort < portRange.first) triedPort = portRange.first + 2;
|
||||
for (const bctbx_list_t *elem = linphone_core_get_calls(core); elem != nullptr; elem = bctbx_list_next(elem)) {
|
||||
LinphoneCall *lcall = reinterpret_cast<LinphoneCall *>(bctbx_list_get_data(elem));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue