From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/llmessage/lltransfermanager.cpp | 118 +++++++++++++++++----------------- 1 file changed, 59 insertions(+), 59 deletions(-) (limited to 'indra/llmessage/lltransfermanager.cpp') diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index 034680caf8..e647df1c11 100755 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -64,7 +64,7 @@ LLTransferManager::~LLTransferManager() { if (mValid) { - llwarns << "LLTransferManager::~LLTransferManager - Should have been cleaned up by message system shutdown process" << llendl; + LL_WARNS() << "LLTransferManager::~LLTransferManager - Should have been cleaned up by message system shutdown process" << LL_ENDL; cleanup(); } } @@ -74,7 +74,7 @@ void LLTransferManager::init() { if (mValid) { - llerrs << "Double initializing LLTransferManager!" << llendl; + LL_ERRS() << "Double initializing LLTransferManager!" << LL_ENDL; } mValid = TRUE; @@ -122,7 +122,7 @@ void LLTransferManager::cleanupConnection(const LLHost &host) { // This can happen legitimately if we've never done a transfer, and we're // cleaning up a circuit. - //llwarns << "Cleaning up nonexistent transfer connection to " << host << llendl; + //LL_WARNS() << "Cleaning up nonexistent transfer connection to " << host << LL_ENDL; return; } LLTransferConnection *connp = iter->second; @@ -203,7 +203,7 @@ LLTransferSource *LLTransferManager::findTransferSource(const LLUUID &transfer_i //static void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) { - //llinfos << "LLTransferManager::processTransferRequest" << llendl; + //LL_INFOS() << "LLTransferManager::processTransferRequest" << LL_ENDL; LLUUID transfer_id; LLTransferSourceType source_type; @@ -219,33 +219,33 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) if (!tscp) { - llwarns << "Source channel not found" << llendl; + LL_WARNS() << "Source channel not found" << LL_ENDL; return; } if (tscp->findTransferSource(transfer_id)) { - llwarns << "Duplicate request for transfer " << transfer_id << ", aborting!" << llendl; + LL_WARNS() << "Duplicate request for transfer " << transfer_id << ", aborting!" << LL_ENDL; return; } S32 size = msgp->getSize("TransferInfo", "Params"); if(size > MAX_PARAMS_SIZE) { - llwarns << "LLTransferManager::processTransferRequest params too big." - << llendl; + LL_WARNS() << "LLTransferManager::processTransferRequest params too big." + << LL_ENDL; return; } - //llinfos << transfer_id << ":" << source_type << ":" << channel_type << ":" << priority << llendl; + //LL_INFOS() << transfer_id << ":" << source_type << ":" << channel_type << ":" << priority << LL_ENDL; LLTransferSource* tsp = LLTransferSource::createSource( source_type, transfer_id, priority); if(!tsp) { - llwarns << "LLTransferManager::processTransferRequest couldn't create" - << " transfer source!" << llendl; + LL_WARNS() << "LLTransferManager::processTransferRequest couldn't create" + << " transfer source!" << LL_ENDL; return; } U8 tmp[MAX_PARAMS_SIZE]; @@ -258,8 +258,8 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) // This should only happen if the data is corrupt or // incorrectly packed. // *NOTE: We may want to call abortTransfer(). - llwarns << "LLTransferManager::processTransferRequest: bad parameters." - << llendl; + LL_WARNS() << "LLTransferManager::processTransferRequest: bad parameters." + << LL_ENDL; delete tsp; return; } @@ -272,7 +272,7 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) //static void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) { - //llinfos << "LLTransferManager::processTransferInfo" << llendl; + //LL_INFOS() << "LLTransferManager::processTransferInfo" << LL_ENDL; LLUUID transfer_id; LLTransferTargetType target_type; @@ -286,11 +286,11 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) msgp->getS32("TransferInfo", "Status", (S32 &)status); msgp->getS32("TransferInfo", "Size", size); - //llinfos << transfer_id << ":" << target_type<< ":" << channel_type << llendl; + //LL_INFOS() << transfer_id << ":" << target_type<< ":" << channel_type << LL_ENDL; LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(msgp->getSender(), channel_type); if (!ttcp) { - llwarns << "Target channel not found" << llendl; + LL_WARNS() << "Target channel not found" << LL_ENDL; // Should send a message to abort the transfer. return; } @@ -298,7 +298,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) LLTransferTarget *ttp = ttcp->findTransferTarget(transfer_id); if (!ttp) { - llwarns << "TransferInfo for unknown transfer! Not able to handle this yet!" << llendl; + LL_WARNS() << "TransferInfo for unknown transfer! Not able to handle this yet!" << LL_ENDL; // This could happen if we're doing a push transfer, although to avoid confusion, // maybe it should be a different message. return; @@ -306,7 +306,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) if (status != LLTS_OK) { - llwarns << transfer_id << ": Non-ok status, cleaning up" << llendl; + LL_WARNS() << transfer_id << ": Non-ok status, cleaning up" << LL_ENDL; ttp->completionCallback(status); // Clean up the transfer. ttcp->deleteTransfer(ttp); @@ -317,8 +317,8 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) S32 params_size = msgp->getSize("TransferInfo", "Params"); if(params_size > MAX_PARAMS_SIZE) { - llwarns << "LLTransferManager::processTransferInfo params too big." - << llendl; + LL_WARNS() << "LLTransferManager::processTransferInfo params too big." + << LL_ENDL; return; } else if(params_size > 0) @@ -330,15 +330,15 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) { // This should only happen if the data is corrupt or // incorrectly packed. - llwarns << "LLTransferManager::processTransferRequest: bad params." - << llendl; + LL_WARNS() << "LLTransferManager::processTransferRequest: bad params." + << LL_ENDL; ttp->abortTransfer(); ttcp->deleteTransfer(ttp); return; } } - //llinfos << "Receiving " << transfer_id << ", size " << size << " bytes" << llendl; + //LL_INFOS() << "Receiving " << transfer_id << ", size " << size << " bytes" << LL_ENDL; ttp->setSize(size); ttp->setGotInfo(TRUE); @@ -358,7 +358,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) { // Perhaps this stuff should be inside a method in LLTransferPacket? // I'm too lazy to do it now, though. -// llinfos << "Playing back delayed packet " << packet_id << llendl; +// LL_INFOS() << "Playing back delayed packet " << packet_id << LL_ENDL; LLTransferPacket *packetp = ttp->mDelayedPacketMap[packet_id]; // This is somewhat inefficient, but avoids us having to duplicate @@ -392,11 +392,11 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) { if (status != LLTS_DONE) { - llwarns << "LLTransferManager::processTransferInfo Error in playback!" << llendl; + LL_WARNS() << "LLTransferManager::processTransferInfo Error in playback!" << LL_ENDL; } else { - llinfos << "LLTransferManager::processTransferInfo replay FINISHED for " << transfer_id << llendl; + LL_INFOS() << "LLTransferManager::processTransferInfo replay FINISHED for " << transfer_id << LL_ENDL; } // This transfer is done, either via error or not. ttp->completionCallback(status); @@ -410,7 +410,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) //static void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) { - //llinfos << "LLTransferManager::processTransferPacket" << llendl; + //LL_INFOS() << "LLTransferManager::processTransferPacket" << LL_ENDL; LLUUID transfer_id; LLTransferChannelType channel_type; @@ -423,20 +423,20 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) msgp->getS32("TransferData", "Status", (S32 &)status); // Find the transfer associated with this packet. - //llinfos << transfer_id << ":" << channel_type << llendl; + //LL_INFOS() << transfer_id << ":" << channel_type << LL_ENDL; LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(msgp->getSender(), channel_type); if (!ttcp) { - llwarns << "Target channel not found" << llendl; + LL_WARNS() << "Target channel not found" << LL_ENDL; return; } LLTransferTarget *ttp = ttcp->findTransferTarget(transfer_id); if (!ttp) { - llwarns << "Didn't find matching transfer for " << transfer_id + LL_WARNS() << "Didn't find matching transfer for " << transfer_id << " processing packet " << packet_id - << " from " << msgp->getSender() << llendl; + << " from " << msgp->getSender() << LL_ENDL; return; } @@ -455,7 +455,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) if ((size < 0) || (size > MAX_PACKET_DATA_SIZE)) { - llwarns << "Invalid transfer packet size " << size << llendl; + LL_WARNS() << "Invalid transfer packet size " << size << LL_ENDL; return; } @@ -472,8 +472,8 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) if(!ttp->addDelayedPacket(packet_id, status, tmp_data, size)) { // Whoops - failed to add a delayed packet for some reason. - llwarns << "Too many delayed packets processing transfer " - << transfer_id << " from " << msgp->getSender() << llendl; + LL_WARNS() << "Too many delayed packets processing transfer " + << transfer_id << " from " << msgp->getSender() << LL_ENDL; ttp->abortTransfer(); ttcp->deleteTransfer(ttp); return; @@ -483,15 +483,15 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) const S32 LL_TRANSFER_WARN_GAP = 10; if(!ttp->gotInfo()) { - llwarns << "Got data packet before information in transfer " + LL_WARNS() << "Got data packet before information in transfer " << transfer_id << " from " << msgp->getSender() - << ", got " << packet_id << llendl; + << ", got " << packet_id << LL_ENDL; } else if((packet_id - ttp->getNextPacketID()) > LL_TRANSFER_WARN_GAP) { - llwarns << "Out of order packet in transfer " << transfer_id + LL_WARNS() << "Out of order packet in transfer " << transfer_id << " from " << msgp->getSender() << ", got " << packet_id - << " expecting " << ttp->getNextPacketID() << llendl; + << " expecting " << ttp->getNextPacketID() << LL_ENDL; } #endif return; @@ -516,11 +516,11 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) { if (status != LLTS_DONE) { - llwarns << "LLTransferManager::processTransferPacket Error in transfer!" << llendl; + LL_WARNS() << "LLTransferManager::processTransferPacket Error in transfer!" << LL_ENDL; } else { -// llinfos << "LLTransferManager::processTransferPacket done for " << transfer_id << llendl; +// LL_INFOS() << "LLTransferManager::processTransferPacket done for " << transfer_id << LL_ENDL; } // This transfer is done, either via error or not. ttp->completionCallback(status); @@ -534,7 +534,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) { // Perhaps this stuff should be inside a method in LLTransferPacket? // I'm too lazy to do it now, though. -// llinfos << "Playing back delayed packet " << packet_id << llendl; +// LL_INFOS() << "Playing back delayed packet " << packet_id << LL_ENDL; LLTransferPacket *packetp = ttp->mDelayedPacketMap[packet_id]; // This is somewhat inefficient, but avoids us having to duplicate @@ -564,7 +564,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) //static void LLTransferManager::processTransferAbort(LLMessageSystem *msgp, void **) { - //llinfos << "LLTransferManager::processTransferPacket" << llendl; + //LL_INFOS() << "LLTransferManager::processTransferPacket" << LL_ENDL; LLUUID transfer_id; LLTransferChannelType channel_type; @@ -598,7 +598,7 @@ void LLTransferManager::processTransferAbort(LLMessageSystem *msgp, void **) } } - llwarns << "Couldn't find transfer " << transfer_id << " to abort!" << llendl; + LL_WARNS() << "Couldn't find transfer " << transfer_id << " to abort!" << LL_ENDL; } @@ -608,7 +608,7 @@ void LLTransferManager::reliablePacketCallback(void **user_data, S32 result) LLUUID *transfer_idp = (LLUUID *)user_data; if (result) { - llwarns << "Aborting reliable transfer " << *transfer_idp << " due to failed reliable resends!" << llendl; + LL_WARNS() << "Aborting reliable transfer " << *transfer_idp << " due to failed reliable resends!" << LL_ENDL; LLTransferSource *tsp = gTransferManager.findTransferSource(*transfer_idp); if (tsp) { @@ -758,7 +758,7 @@ void LLTransferSourceChannel::updateTransfers() // We DON'T want to send any packets if they're blocked, they'll just end up // piling up on the other end. - //llwarns << "Blocking transfers due to blocked circuit for " << getHost() << llendl; + //LL_WARNS() << "Blocking transfers due to blocked circuit for " << getHost() << LL_ENDL; return; } @@ -776,7 +776,7 @@ void LLTransferSourceChannel::updateTransfers() BOOL done = FALSE; for (iter = mTransferSources.mMap.begin(); (iter != mTransferSources.mMap.end()) && !done;) { - //llinfos << "LLTransferSourceChannel::updateTransfers()" << llendl; + //LL_INFOS() << "LLTransferSourceChannel::updateTransfers()" << LL_ENDL; // Do stuff. next = iter; next++; @@ -848,11 +848,11 @@ void LLTransferSourceChannel::updateTransfers() // We're OK, don't need to do anything. Keep sending data. break; case LLTS_ERROR: - llwarns << "Error in transfer dataCallback!" << llendl; + LL_WARNS() << "Error in transfer dataCallback!" << LL_ENDL; // fall through case LLTS_DONE: // We need to clean up this transfer source. - //llinfos << "LLTransferSourceChannel::updateTransfers() " << tsp->getID() << " done" << llendl; + //LL_INFOS() << "LLTransferSourceChannel::updateTransfers() " << tsp->getID() << " done" << LL_ENDL; tsp->completionCallback(status); delete tsp; @@ -860,7 +860,7 @@ void LLTransferSourceChannel::updateTransfers() iter = next; break; default: - llerrs << "Unknown transfer error code!" << llendl; + LL_ERRS() << "Unknown transfer error code!" << LL_ENDL; } // At this point, we should do priority adjustment (since some transfers like @@ -906,7 +906,7 @@ BOOL LLTransferSourceChannel::deleteTransfer(LLTransferSource *tsp) } } - llerrs << "Unable to find transfer source to delete!" << llendl; + LL_ERRS() << "Unable to find transfer source to delete!" << LL_ENDL; return FALSE; } @@ -947,7 +947,7 @@ void LLTransferTargetChannel::requestTransfer( source_params.getType()); if (!ttp) { - llwarns << "LLTransferManager::requestTransfer aborting due to target creation failure!" << llendl; + LL_WARNS() << "LLTransferManager::requestTransfer aborting due to target creation failure!" << LL_ENDL; return; } @@ -1021,7 +1021,7 @@ BOOL LLTransferTargetChannel::deleteTransfer(LLTransferTarget *ttp) } } - llerrs << "Unable to find transfer target to delete!" << llendl; + LL_ERRS() << "Unable to find transfer target to delete!" << LL_ENDL; return FALSE; } @@ -1083,7 +1083,7 @@ void LLTransferSource::sendTransferStatus(LLTSCode status) void LLTransferSource::abortTransfer() { // Send a message down, call the completion callback - llinfos << "LLTransferSource::Aborting transfer " << getID() << " to " << mChannelp->getHost() << llendl; + LL_INFOS() << "LLTransferSource::Aborting transfer " << getID() << " to " << mChannelp->getHost() << LL_ENDL; gMessageSystem->newMessage("TransferAbort"); gMessageSystem->nextBlock("TransferInfo"); gMessageSystem->addUUID("TransferID", getID()); @@ -1101,7 +1101,7 @@ void LLTransferSource::registerSourceType(const LLTransferSourceType stype, LLTr { // Disallow changing what class handles a source type // Unclear when you would want to do this, and whether it would work. - llerrs << "Reregistering source type " << stype << llendl; + LL_ERRS() << "Reregistering source type " << stype << LL_ENDL; } else { @@ -1129,7 +1129,7 @@ LLTransferSource *LLTransferSource::createSource(const LLTransferSourceType styp if (!sSourceCreateMap.count(stype)) { // Use the callback to create the source type if it's not there. - llwarns << "Unknown transfer source type: " << stype << llendl; + LL_WARNS() << "Unknown transfer source type: " << stype << LL_ENDL; return NULL; } return (sSourceCreateMap[stype])(id, priority); @@ -1216,7 +1216,7 @@ LLTransferTarget::~LLTransferTarget() void LLTransferTarget::abortTransfer() { // Send a message up, call the completion callback - llinfos << "LLTransferTarget::Aborting transfer " << getID() << " from " << mChannelp->getHost() << llendl; + LL_INFOS() << "LLTransferTarget::Aborting transfer " << getID() << " from " << mChannelp->getHost() << LL_ENDL; gMessageSystem->newMessage("TransferAbort"); gMessageSystem->nextBlock("TransferInfo"); gMessageSystem->addUUID("TransferID", getID()); @@ -1248,7 +1248,7 @@ bool LLTransferTarget::addDelayedPacket( #ifdef _DEBUG if (mDelayedPacketMap.find(packet_id) != mDelayedPacketMap.end()) { - llerrs << "Packet ALREADY in delayed packet map!" << llendl; + LL_ERRS() << "Packet ALREADY in delayed packet map!" << LL_ENDL; } #endif @@ -1269,7 +1269,7 @@ LLTransferTarget* LLTransferTarget::createTarget( case LLTTT_VFILE: return new LLTransferTargetVFile(id, source_type); default: - llwarns << "Unknown transfer target type: " << type << llendl; + LL_WARNS() << "Unknown transfer target type: " << type << LL_ENDL; return NULL; } } @@ -1304,7 +1304,7 @@ void LLTransferSourceParamsInvItem::setAsset(const LLUUID &asset_id, const LLAss void LLTransferSourceParamsInvItem::packParams(LLDataPacker &dp) const { - lldebugs << "LLTransferSourceParamsInvItem::packParams()" << llendl; + LL_DEBUGS() << "LLTransferSourceParamsInvItem::packParams()" << LL_ENDL; dp.packUUID(mAgentID, "AgentID"); dp.packUUID(mSessionID, "SessionID"); dp.packUUID(mOwnerID, "OwnerID"); -- cgit v1.2.3 From 25937040de9a787c221aae7f178f43827c799028 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Aug 2013 12:38:12 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms converted many values over to units system in effort to track down source of 0 ping --- indra/llmessage/lltransfermanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmessage/lltransfermanager.cpp') diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index e647df1c11..71be13ab18 100755 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -815,7 +815,7 @@ void LLTransferSourceChannel::updateTransfers() gMessageSystem->addS32("Status", status); gMessageSystem->addBinaryData("Data", datap, data_size); sent_bytes = gMessageSystem->getCurrentSendTotal(); - gMessageSystem->sendReliable(getHost(), LL_DEFAULT_RELIABLE_RETRIES, TRUE, 0.f, + gMessageSystem->sendReliable(getHost(), LL_DEFAULT_RELIABLE_RETRIES, TRUE, F32Seconds(0.f), LLTransferManager::reliablePacketCallback, (void**)cb_uuid); // Do bookkeeping for the throttle -- cgit v1.2.3