summaryrefslogtreecommitdiff
path: root/indra/llcommon/llavatarname.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-04-22 14:13:45 -0700
committerJames Cook <james@lindenlab.com>2010-04-22 14:13:45 -0700
commit98f5fc5ff006a82cacde47de0cbb564b6e703597 (patch)
tree13866bdd70c585c500fbe5c99699c48770ca4519 /indra/llcommon/llavatarname.cpp
parent61d79980d888a7bbac96df9955582f835b169a97 (diff)
DEV-47529 Turn off display names if no capability from simulator, and
Display name update broadcasts entire new name record to nearby viewers Display name update directly inserts new name into sim cache indra.xml has display_names_enabled setting to control cap Synchronized viewer and server versions of avatar name cache Reviewed with Ambroff
Diffstat (limited to 'indra/llcommon/llavatarname.cpp')
-rw-r--r--indra/llcommon/llavatarname.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index 62ba7cb112..c35b8380b8 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -35,12 +35,15 @@
#include "llavatarname.h"
+#include "lldate.h"
+#include "llsd.h"
+
// Store these in pre-built std::strings to avoid memory allocations in
// LLSD map lookups
static const std::string SL_ID("sl_id");
static const std::string DISPLAY_NAME("display_name");
static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default");
-static const std::string EXPIRES("expires");
+static const std::string DISPLAY_NAME_EXPIRES("display_name_expires");
LLAvatarName::LLAvatarName()
: mSLID(),
@@ -64,7 +67,7 @@ LLSD LLAvatarName::asLLSD() const
sd[SL_ID] = mSLID;
sd[DISPLAY_NAME] = mDisplayName;
sd[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault;
- sd[EXPIRES] = mExpires;
+ sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires);
return sd;
}
@@ -73,5 +76,6 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
mSLID = sd[SL_ID].asString();
mDisplayName = sd[DISPLAY_NAME].asString();
mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean();
- mExpires = sd[EXPIRES].asReal();
+ LLDate expires = sd[DISPLAY_NAME_EXPIRES];
+ mExpires = expires.secondsSinceEpoch();
}