aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llmessagetemplate.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-01 17:39:58 -0600
committerJacek Antonelli2008-12-01 17:40:06 -0600
commit7abecb48babe6a6f09bf6692ba55076546cfced9 (patch)
tree8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/llmessage/llmessagetemplate.cpp
parentSecond Life viewer sources 1.21.6 (diff)
downloadmeta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz
Second Life viewer sources 1.22.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/llmessage/llmessagetemplate.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/linden/indra/llmessage/llmessagetemplate.cpp b/linden/indra/llmessage/llmessagetemplate.cpp
index 4a560ca..ff44d45 100644
--- a/linden/indra/llmessage/llmessagetemplate.cpp
+++ b/linden/indra/llmessage/llmessagetemplate.cpp
@@ -50,7 +50,7 @@ void LLMsgVarData::addData(const void *data, S32 size, EMsgVariableType type, S3
50 } 50 }
51 if(size) 51 if(size)
52 { 52 {
53 delete mData; // Delete it if it already exists 53 delete[] mData; // Delete it if it already exists
54 mData = new U8[size]; 54 mData = new U8[size];
55 htonmemcpy(mData, data, mType, size); 55 htonmemcpy(mData, data, mType, size);
56 } 56 }
@@ -175,3 +175,23 @@ std::ostream& operator<<(std::ostream& s, LLMessageTemplate &msg)
175 175
176 return s; 176 return s;
177} 177}
178
179void LLMessageTemplate::banUdp()
180{
181 static const char* deprecation[] = {
182 "NotDeprecated",
183 "Deprecated",
184 "UDPDeprecated",
185 "UDPBlackListed"
186 };
187 if (mDeprecation != MD_DEPRECATED)
188 {
189 llinfos << "Setting " << mName << " to UDPBlackListed was " << deprecation[mDeprecation] << llendl;
190 mDeprecation = MD_UDPBLACKLISTED;
191 }
192 else
193 {
194 llinfos << mName << " is already more deprecated than UDPBlackListed" << llendl;
195 }
196}
197