From 52486129ae0a40192c2a035ea74a0b4c5acb6d69 Mon Sep 17 00:00:00 2001 From: Hazim Gazov Date: Wed, 12 May 2010 18:46:37 -0300 Subject: [PATCH] fixed outbound message logger, moved the logging function to llpacketring instead of llnet --- indra/llmessage/llpacketring.cpp | 9 +++++++++ indra/llmessage/net.cpp | 12 ------------ indra/newview/llfloatermessagelog.cpp | 11 +++-------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index 6e4e8e7cf..cb01169c6 100644 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -50,6 +50,11 @@ #include #endif +// +#include "llmessagelog.h" +#include "message.h" +// + /////////////////////////////////////////////////////////// LLPacketRing::LLPacketRing () : @@ -273,7 +278,11 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host) { + // + LLMessageLog::log(LLHost("127.0.0.1", gMessageSystem->getListenPort()), host, (U8*)send_buffer, buf_size); + // BOOL status = TRUE; + if (!mUseOutThrottle) { return doSendPacket(h_socket, send_buffer, buf_size, host ); diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index 8dea90d66..93ed6e044 100644 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp @@ -55,11 +55,6 @@ #include "llhost.h" #include "lltimer.h" #include "indra_constants.h" -// -#include "llmessagelog.h" -#include "message.h" -// - #include "llsocks5.h" @@ -426,9 +421,6 @@ S32 receive_packet(int hSocket, char * receiveBuffer) // Returns TRUE on success. BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort) { - // - LLMessageLog::log(LLHost("127.0.0.1", 0), LLHost(recipient, nPort), (U8*)sendBuffer, size); - // // Sends a packet to the address set in initNet // @@ -760,10 +752,6 @@ int receive_packet(int hSocket, char * receiveBuffer) BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, int nPort) { - // - LLMessageLog::log(LLHost("127.0.0.1", 0), LLHost(recipient, nPort), (U8*)sendBuffer, size); - // - int ret; BOOL success; BOOL resend; diff --git a/indra/newview/llfloatermessagelog.cpp b/indra/newview/llfloatermessagelog.cpp index 859d2ec09..13979083f 100644 --- a/indra/newview/llfloatermessagelog.cpp +++ b/indra/newview/llfloatermessagelog.cpp @@ -441,13 +441,8 @@ BOOL LLMessageLogFilterApply::tick() LLFloaterMessageLog::sInstance->stopApplyingFilter(); return TRUE; } - try - { - LLFloaterMessageLog::sInstance->conditionalLog(LLFloaterMessageLogItem((*mIter))); - } catch (char *str) - { - llwarns << "DERPADERP" << llendl; - } + LLFloaterMessageLog::sInstance->conditionalLog(LLFloaterMessageLogItem((*mIter))); + mIter++; mProgress++; } @@ -688,7 +683,7 @@ void LLFloaterMessageLog::onLog(LLMessageLogEntry entry) } // static void LLFloaterMessageLog::conditionalLog(LLFloaterMessageLogItem item) -{ +{ if(!sBusyApplyingFilter) sInstance->childSetText("log_status_text", llformat("Showing %d messages from %d", sFloaterMessageLogItems.size(), sMessageLogEntries.size())); std::string find_name = item.mName;