Commit 2504631c authored by Simon Morlat's avatar Simon Morlat

Fix signess warning.

parent 41f3d91b
......@@ -1119,7 +1119,7 @@ int MediaSessionPrivate::selectRandomPort (int streamIndex, pair<int, int> portR
for (int nbTries = 0; nbTries < 100; nbTries++) {
bool alreadyUsed = false;
unsigned int rangeSize = static_cast<unsigned int>(portRange.second - portRange.first);
unsigned int randomInRangeSize = (ortp_random() % rangeSize) & ~0x1; /* Select an even number */
unsigned int randomInRangeSize = (ortp_random() % rangeSize) & (unsigned int)~0x1; /* Select an even number */
int triedPort = ((int)randomInRangeSize) + portRange.first;
/*If portRange.first is even, the triedPort will be even too. The one who configures a port range that starts with an odd number will
* get odd RTP port numbers.*/
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