diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-09 18:17:42 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-09 18:17:42 -0800 |
commit | f4186b6d3d45259c83fa1b13db25abcd34f227a9 (patch) | |
tree | d5830f8cea2dc4932140cd245539c1a6c2161995 /indra/llmath/llbboxlocal.cpp | |
parent | ebbb468a795d503a8869467d642d5f4962a3d7bf (diff) |
PARTIAL FIX (workaround) DEV-41949: LLMediaEntry::setWhitelist() and LLMediaEntry::asLLSD() have a contract conflict
Review #31
So, here's what was happening, briefly:
- LLMediaEntry::setWhitelist() would be a no-op if given an LLSD that did not have a WHITELIST_KEY
- LLMediaEntry::asLLSD() would render the LLMediaEntry *without* a WHITELIST_KEY if the whitelist was empty
Therefore, when the viewer marshalled an LLMediaEntry for the server, it would send it without a WHITELIST_KEY. When the server got it, it would not erase the last value.
This is actually a workaround: it patches asLLSD() with an LLSD::emptyArray() if the key is not there. However, this should be fixed on the server: in either or both of the following ways:
1) LLMediaEntry::setWhitelist() should not be a no-op if the LLSD has no WHITELIST_KEY: it should erase the whitelist
2) LLMediaEntry::asLLSD() should render an empty whitelist in WHITELIST_KEY as an empty array
Note that both could be done and still work.
A unit test should and will be written next.
Diffstat (limited to 'indra/llmath/llbboxlocal.cpp')
0 files changed, 0 insertions, 0 deletions