summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llmediaentry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive/llmediaentry.cpp')
-rw-r--r--indra/llprimitive/llmediaentry.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llprimitive/llmediaentry.cpp b/indra/llprimitive/llmediaentry.cpp
index fa04bf80e7..2fc1e5e60c 100644
--- a/indra/llprimitive/llmediaentry.cpp
+++ b/indra/llprimitive/llmediaentry.cpp
@@ -164,6 +164,7 @@ void LLMediaEntry::asLLSD(LLSD& sd) const
// "security" fields
sd[WHITELIST_ENABLE_KEY] = mWhiteListEnable;
+ sd.erase(WHITELIST_KEY);
for (U32 i=0; i<mWhiteList.size(); i++)
{
sd[WHITELIST_KEY].append(mWhiteList[i]);
@@ -388,8 +389,12 @@ U32 LLMediaEntry::setWhiteList( const std::vector<std::string> &whitelist )
U32 LLMediaEntry::setWhiteList( const LLSD &whitelist )
{
- // If whitelist is undef, this is a no-op.
- if (whitelist.isUndefined()) return LSL_STATUS_OK;
+ // If whitelist is undef, the whitelist is cleared
+ if (whitelist.isUndefined())
+ {
+ mWhiteList.clear();
+ return LSL_STATUS_OK;
+ }
// However, if the whitelist is an empty array, erase it.
if (whitelist.isArray())