diff options
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llcircuit.cpp | 19 | ||||
-rw-r--r-- | indra/llmessage/llcircuit.h | 5 | ||||
-rw-r--r-- | indra/llmessage/message.cpp | 7 | ||||
-rw-r--r-- | indra/llmessage/message.h | 2 |
4 files changed, 14 insertions, 19 deletions
diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index 1d1be56349..0db9f8e2f1 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -1170,13 +1170,11 @@ std::ostream& operator<<(std::ostream& s, LLCircuitData& circuit) return s; } -const LLString LLCircuitData::getInfoString() const +void LLCircuitData::getInfo(LLSD& info) const { - std::ostringstream info; - info << "Circuit: " << mHost << std::endl - << (mbAlive ? "Alive" : "Not Alive") << std::endl - << "Age: " << mExistenceTimer.getElapsedTimeF32() << std::endl; - return LLString(info.str()); + info["Host"] = mHost.getIPandPort(); + info["Alive"] = mbAlive; + info["Age"] = mExistenceTimer.getElapsedTimeF32(); } void LLCircuitData::dumpResendCountAndReset() @@ -1200,17 +1198,16 @@ std::ostream& operator<<(std::ostream& s, LLCircuit &circuit) return s; } -const LLString LLCircuit::getInfoString() const +void LLCircuit::getInfo(LLSD& info) const { - std::ostringstream info; - info << "Circuit Info:" << std::endl; LLCircuit::circuit_data_map::const_iterator end = mCircuitData.end(); LLCircuit::circuit_data_map::const_iterator it; + LLSD circuit_info; for(it = mCircuitData.begin(); it != end; ++it) { - info << (*it).second->getInfoString() << std::endl; + (*it).second->getInfo(circuit_info); + info["Circuits"].append(circuit_info); } - return LLString(info.str()); } void LLCircuit::getCircuitRange( diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index 128b1bc222..1a6611f5d4 100644 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -75,6 +75,7 @@ const S32 LL_MAX_ACKED_PACKETS_PER_FRAME = 200; // class LLMessageSystem; class LLEncodedDatagramService; +class LLSD; // // Classes @@ -158,7 +159,7 @@ public: // void checkPeriodTime(); // Reset per-period counters if necessary. friend std::ostream& operator<<(std::ostream& s, LLCircuitData &circuit); - const LLString getInfoString() const; + void getInfo(LLSD& info) const; friend class LLCircuit; friend class LLMessageSystem; @@ -304,7 +305,7 @@ public: void sendAcks(); friend std::ostream& operator<<(std::ostream& s, LLCircuit &circuit); - const LLString getInfoString() const; + void getInfo(LLSD& info) const; void dumpResends(); diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index e2cd19b264..d446730c33 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -1562,12 +1562,9 @@ U32 LLMessageSystem::getOurCircuitCode() return mOurCircuitCode; } -LLString LLMessageSystem::getCircuitInfoString() +void LLMessageSystem::getCircuitInfo(LLSD& info) const { - LLString info_string; - - info_string += mCircuitInfo.getInfoString(); - return info_string; + mCircuitInfo.getInfo(info); } // returns whether the given host is on a trusted circuit diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index 4454b40ab9..3381ece222 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -529,7 +529,7 @@ public: bool isMatchingDigestForWindow(const char* digest, const S32 window) const; void showCircuitInfo(); - LLString getCircuitInfoString(); + void getCircuitInfo(LLSD& info) const; U32 getOurCircuitCode(); |