diff options
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llcachename.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/llcircuit.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/llpacketring.cpp | 4 | ||||
-rw-r--r-- | indra/llmessage/llxfermanager.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 075f4f01cf..e5bc3814f6 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -390,7 +390,7 @@ BOOL LLCacheName::getName(const LLUUID& id, char* first, char* last) { //The function signature needs to change to pass in the //length of first and last. - strcpy(first,(frand(1.0f) < HIPPO_PROBABILITY) + strcpy(first,(ll_frand() < HIPPO_PROBABILITY) ? CN_HIPPOS : CN_WAITING); strcpy(last, ""); diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index d3ef92e4a7..514fb10b4a 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -86,12 +86,12 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id) // Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been // running a message system loop. F64 mt_sec = LLMessageSystem::getMessageTimeSeconds(TRUE); - F32 distribution_offset = frand(1.0f); + F32 distribution_offset = ll_frand(); mPingTime = mt_sec; mLastPingSendTime = mt_sec + PING_INTERVAL * distribution_offset; mLastPingReceivedTime = mt_sec; - mNextPingSendTime = mLastPingSendTime + 0.95*PING_INTERVAL + frand(0.1f*PING_INTERVAL); + mNextPingSendTime = mLastPingSendTime + 0.95*PING_INTERVAL + ll_frand(0.1f*PING_INTERVAL); mPeriodTime = mt_sec; mTimeoutCallback = NULL; @@ -785,7 +785,7 @@ void LLCircuit::updateWatchDogTimers(LLMessageSystem *msgsys) if (cdp->updateWatchDogTimers(msgsys)) { // Randomize our pings a bit by doing some up to 5% early or late - F64 dt = 0.95f*PING_INTERVAL + frand(0.1f*PING_INTERVAL); + F64 dt = 0.95f*PING_INTERVAL + ll_frand(0.1f*PING_INTERVAL); // Remove it, and reinsert it with the new next ping time. // Always remove before changing the sorting key. diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index 4f17d1ae5a..1bf72edfc1 100644 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -147,7 +147,7 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) mActualBitsIn += packetp->getSize() * 8; // Fake packet loss - if (mDropPercentage && (frand(100.f) < mDropPercentage)) + if (mDropPercentage && (ll_frand(100.f) < mDropPercentage)) { mPacketsToDrop++; } @@ -202,7 +202,7 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) if (packet_size) // did we actually get a packet? { - if (mDropPercentage && (frand(100.f) < mDropPercentage)) + if (mDropPercentage && (ll_frand(100.f) < mDropPercentage)) { mPacketsToDrop++; } diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index e2d8cd30b3..bafa783799 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -1089,7 +1089,7 @@ void process_request_xfer(LLMessageSystem *mesgsys, void **user_data) void continue_file_receive(LLMessageSystem *mesgsys, void **user_data) { #if LL_TEST_XFER_REXMIT - if (frand(1.f) > 0.05f) + if (ll_frand() > 0.05f) { #endif gXferManager->processReceiveData(mesgsys,user_data); |