aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llmessagetemplate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmessage/llmessagetemplate.cpp')
-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