summaryrefslogtreecommitdiff
path: root/indra/llinventory/llparcel.cpp
diff options
context:
space:
mode:
authorDave SIMmONs <simon@lindenlab.com>2011-05-02 16:35:55 -0700
committerDave SIMmONs <simon@lindenlab.com>2011-05-02 16:35:55 -0700
commit9bfae21706288802f94d642eb252ac78b4d9e85c (patch)
treefe02b30f05ba6a515212e35a018e97a81a27dfed /indra/llinventory/llparcel.cpp
parentf393774caf49313f24d33cb2b33b6ad92c70977f (diff)
ER-858: Add viewer checkbox to toggle parcel privacy settings. Reviewed by Kelly
Diffstat (limited to 'indra/llinventory/llparcel.cpp')
-rw-r--r--indra/llinventory/llparcel.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 0a4cd51ea0..7562bb8320 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -702,7 +702,7 @@ void LLParcel::packMessage(LLSD& msg)
msg["user_location"] = ll_sd_from_vector3(mUserLocation);
msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt);
msg["landing_type"] = (U8)mLandingType;
-
+ msg["privacy"] = (LLSD::Boolean) getPrivacy();
}
@@ -721,6 +721,14 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer );
setMediaURL(buffer);
+ BOOL private_parcel = FALSE;
+ bool have_privacy_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_Privacy) > 0);
+ if (have_privacy_data)
+ {
+ msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_Privacy, private_parcel);
+ }
+ setPrivacy((bool) private_parcel);
+
// non-optimized version
msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale );