summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llavatarname.cpp2
-rw-r--r--indra/llcommon/llavatarname.h2
-rw-r--r--indra/llmessage/llavatarnamecache.cpp33
-rw-r--r--indra/newview/llviewermessage.cpp1
-rw-r--r--indra/newview/llviewerregion.cpp5
5 files changed, 24 insertions, 19 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index 48ff7f3cc8..5debf88818 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -39,7 +39,7 @@ LLAvatarName::LLAvatarName()
: mSLID(),
mDisplayName(),
mIsDisplayNameDefault(false),
- mExpires(U32_MAX),
+ mExpires(F64_MAX),
mBadge()
{ }
diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h
index 5a0306c57e..72e2980b5c 100644
--- a/indra/llcommon/llavatarname.h
+++ b/indra/llcommon/llavatarname.h
@@ -58,7 +58,7 @@ public:
// Names can change, so need to keep track of when name was
// last checked.
// Unix time-from-epoch seconds
- U32 mExpires;
+ F64 mExpires;
// Can be a viewer UI image name ("Person_Check") or a server-side
// image UUID, or empty string.
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 8268624b84..2c143266fe 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -60,7 +60,7 @@ namespace LLAvatarNameCache
// agent IDs that have been requested, but with no reply
// maps agent ID to frame time request was made
- typedef std::map<LLUUID, F32> pending_queue_t;
+ typedef std::map<LLUUID, F64> pending_queue_t;
pending_queue_t sPendingQueue;
// Callbacks to fire when we received a name.
@@ -96,12 +96,12 @@ namespace LLAvatarNameCache
<key>agents</key>
<array>
<map>
- <key>seconds_until_display_name_update</key>
- <integer/>
+ <key>display_name_next_update</key>
+ <date>2010-04-16T21:34:02+00:00Z</date>
+ <key>display_name_expires</key>
+ <date>2010-04-16T21:32:26.142178+00:00Z</date>
<key>display_name</key>
<string>MickBot390 LLQABot</string>
- <key>seconds_until_display_name_expires</key>
- <integer/>
<key>sl_id</key>
<string>mickbot390.llqabot</string>
<key>id</key>
@@ -110,12 +110,12 @@ namespace LLAvatarNameCache
<boolean>false</boolean>
</map>
<map>
- <key>seconds_until_display_name_update</key>
- <integer/>
+ <key>display_name_next_update</key>
+ <date>2010-04-16T21:34:02+00:00Z</date>
+ <key>display_name_expires</key>
+ <date>2010-04-16T21:32:26.142178+00:00Z</date>
<key>display_name</key>
<string>Bjork Gudmundsdottir</string>
- <key>seconds_until_display_name_expires</key>
- <integer>3600</integer>
<key>sl_id</key>
<string>sardonyx.linden</string>
<key>id</key>
@@ -155,10 +155,9 @@ void LLAvatarNameCache::processNameFromService(const LLSD& row)
av_name.mSLID = row["sl_id"].asString();
av_name.mDisplayName = row["display_name"].asString();
av_name.mIsDisplayNameDefault = row["is_display_name_default"].asBoolean();
+ av_name.mExpires = row["display_name_expires"].asReal();
- U32 now = (U32)LLFrameTimer::getTotalSeconds();
- S32 seconds_until_expires = row["seconds_until_display_name_expires"].asInteger();
- av_name.mExpires = now + seconds_until_expires;
+ llinfos << "JAMESDEBUG expires " << av_name.mExpires << " now " << LLFrameTimer::getTotalSeconds() << llendl;
// HACK for pretty stars
//if (row["last_name"].asString() == "Linden")
@@ -287,7 +286,7 @@ void LLAvatarNameCache::idle()
requestNames();
// Move requests from Ask queue to Pending queue
- U32 now = (U32)LLFrameTimer::getTotalSeconds();
+ F64 now = LLFrameTimer::getTotalSeconds();
ask_queue_t::const_iterator it = sAskQueue.begin();
for ( ; it != sAskQueue.end(); ++it)
{
@@ -298,9 +297,9 @@ void LLAvatarNameCache::idle()
bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id)
{
- const U32 PENDING_TIMEOUT_SECS = 5 * 60;
- U32 now = (U32)LLFrameTimer::getTotalSeconds();
- U32 expire_time = now - PENDING_TIMEOUT_SECS;
+ const F64 PENDING_TIMEOUT_SECS = 5.0 * 60.0;
+ F64 now = LLFrameTimer::getTotalSeconds();
+ F64 expire_time = now - PENDING_TIMEOUT_SECS;
pending_queue_t::const_iterator it = sPendingQueue.find(agent_id);
if (it != sPendingQueue.end())
@@ -313,7 +312,7 @@ bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id)
void LLAvatarNameCache::eraseExpired()
{
- U32 now = (U32)LLFrameTimer::getTotalSeconds();
+ F64 now = LLFrameTimer::getTotalSeconds();
cache_t::iterator it = sCache.begin();
while (it != sCache.end())
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 13f52d8db7..000eb45121 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4615,6 +4615,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
msg->getS32("TransactionInfo", "Amount", amount);
msg->getString("TransactionInfo", "ItemDescription", item_description);
llinfos << "JAMESDEBUG money_balance_reply source " << source_id
+ << " dest " << dest_id
<< " item " << item_description << llendl;
}
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 2b907ee24a..feade68edc 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -176,6 +176,9 @@ public:
}
}
+ // JAMESDEBUG *TODO* THIS IS WRONG!!!!!!!!!!!!!!!!!!!!!
+ // this isn't necessarily the region the viewer is in
+
// Avatar name lookup library needs to know who to ask
std::string name_lookup_url = mRegion->getCapability("GetDisplayNames");
// capabilities require URLs with slashes before query params, like:
@@ -188,6 +191,8 @@ public:
name_lookup_url += '/';
}
LLAvatarNameCache::setNameLookupURL(name_lookup_url);
+
+ llinfos << "JAMESDEBUG cap " << name_lookup_url << llendl;
if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{