summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/llagent.cpp2
-rw-r--r--indra/newview/llassetuploadresponders.cpp10
-rw-r--r--indra/newview/llassetuploadresponders.h10
-rw-r--r--indra/newview/lleventpoll.cpp261
-rw-r--r--indra/newview/lleventpoll.h7
-rw-r--r--indra/newview/llinventorymodel.cpp167
-rw-r--r--indra/newview/llselectmgr.cpp3
-rw-r--r--indra/newview/llselectmgr.h4
-rw-r--r--indra/newview/llstartup.cpp343
-rw-r--r--indra/newview/llstartup.h11
-rw-r--r--indra/newview/lltoolbrush.cpp3
-rw-r--r--indra/newview/lltoolbrush.h2
-rw-r--r--indra/newview/llviewerjointmesh_sse.cpp5
-rw-r--r--indra/newview/llviewerjointmesh_sse2.cpp7
-rw-r--r--indra/newview/llviewerjointmesh_vec.cpp3
-rw-r--r--indra/newview/llviewermenu.cpp62
-rw-r--r--indra/newview/llviewermenufile.cpp3
-rw-r--r--indra/newview/llviewermessage.cpp79
-rw-r--r--indra/newview/llviewernetwork.h2
-rw-r--r--indra/newview/llviewerparcelmgr.cpp12
-rw-r--r--indra/newview/llviewerregion.cpp36
-rw-r--r--indra/newview/llviewerregion.h7
-rw-r--r--indra/newview/llworld.cpp52
-rwxr-xr-xindra/newview/viewer_manifest.py1
26 files changed, 348 insertions, 750 deletions
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 794f869468..a0320e3f1d 100644
--- a/indra/newview/English.lproj/InfoPlist.strings
+++ b/indra/newview/English.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 1.17.3.0";
-CFBundleGetInfoString = "Second Life version 1.17.3.0, Copyright 2004-2007 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 1.18.0.4";
+CFBundleGetInfoString = "Second Life version 1.18.0.4, Copyright 2004-2007 Linden Research, Inc.";
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index 5d351bb122..0536589d7a 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>1.17.3.0</string>
+ <string>1.18.0.4</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 6713ea3eb2..dbbe1affb9 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -5701,7 +5701,6 @@ void LLAgent::requestEnterGodMode()
// simulator and userserver need to know about your request
sendReliableMessage();
- msg->sendReliable(gUserServer);
}
void LLAgent::requestLeaveGodMode()
@@ -5717,7 +5716,6 @@ void LLAgent::requestLeaveGodMode()
// simulator and userserver need to know about your request
sendReliableMessage();
- msg->sendReliable(gUserServer);
}
// wearables
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 79faec1211..0fcf28ee6c 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -1,6 +1,10 @@
-// llassetuploadresponders.cpp
-// Copyright 2006, Linden Research, Inc.
-// Processes responses received for asset upload requests.
+/**
+ * @file llassetuploadresponders.cpp
+ * @brief Processes responses received for asset upload requests.
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
#include "llviewerprecompiledheaders.h"
diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h
index ef8cd3834a..90d29019f1 100644
--- a/indra/newview/llassetuploadresponders.h
+++ b/indra/newview/llassetuploadresponders.h
@@ -1,6 +1,10 @@
-// llassetuploadresponders.h
-// Copyright 2006, Linden Research, Inc.
-// Processes responses received for asset upload requests.
+/**
+ * @file llassetuploadresponders.h
+ * @brief Processes responses received for asset upload requests.
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
#ifndef LL_LLASSETUPLOADRESPONDER_H
#define LL_LLASSETUPLOADRESPONDER_H
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 4452a134ae..8c362a0ac5 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -16,155 +16,162 @@
#include "llviewerregion.h"
#include "message.h"
-class LLEventPoll::Impl : LLHTTPClient::Responder
+namespace
{
-public:
- static Impl& start(const std::string& pollURL);
- void stop();
-
-private:
- Impl(const std::string& pollURL);
- ~Impl();
-
- void makeRequest();
- void handleMessage(const LLSD& content);
- virtual void error(U32 status, const std::string& reason);
- virtual void result(const LLSD& content);
-
-private:
- typedef LLHTTPClient::ResponderPtr Ptr;
-
- Ptr mPtr;
- bool mDone;
-
- std::string mPollURL;
- std::string mSender;
-
- LLSD mAcknowledge;
-
- // these are only here for debugging so we can see which poller is which
- static int sCount;
- int mCount;
-};
-
-//static
-LLEventPoll::Impl& LLEventPoll::Impl::start(
- const std::string& pollURL)
-{
- Impl* i = new Impl(pollURL);
- llinfos << "LLEventPoll::Impl::start <" << i->mCount << "> "
- << pollURL << llendl;
- return *i;
-}
-
-void LLEventPoll::Impl::stop()
-{
- lldebugs << "LLEventPoll::Impl::stop <" << mCount << "> "
- << mPollURL << llendl;
- // there should be a way to stop a LLHTTPClient request in progress
- mDone = true;
- mPtr = NULL;
-}
-
-int LLEventPoll::Impl::sCount = 0;
-
-LLEventPoll::Impl::Impl(const std::string& pollURL)
- : mPtr(NULL), mDone(false),
- mPollURL(pollURL),
- mCount(++sCount)
-{
- mPtr = this;
- //extract host and port of simulator to set as sender
- LLViewerRegion *regionp = gAgent.getRegion();
- if (!regionp)
+ class LLEventPollResponder : public LLHTTPClient::Responder
+ {
+ public:
+
+ static LLHTTPClient::ResponderPtr start(const std::string& pollURL, const LLHost& sender);
+ void stop();
+
+ private:
+ LLEventPollResponder(const std::string& pollURL, const LLHost& sender);
+ ~LLEventPollResponder();
+
+ void makeRequest();
+ void handleMessage(const LLSD& content);
+ virtual void error(U32 status, const std::string& reason);
+ virtual void result(const LLSD& content);
+
+ private:
+
+ bool mDone;
+
+ std::string mPollURL;
+ std::string mSender;
+
+ LLSD mAcknowledge;
+
+ // these are only here for debugging so we can see which poller is which
+ static int sCount;
+ int mCount;
+ };
+
+ //static
+ LLHTTPClient::ResponderPtr LLEventPollResponder::start(
+ const std::string& pollURL, const LLHost& sender)
{
- llerrs << "LLEventPoll initialized before region is added." << llendl;
+ LLHTTPClient::ResponderPtr result = new LLEventPollResponder(pollURL, sender);
+ llinfos << "LLEventPollResponder::start <" << sCount << "> "
+ << pollURL << llendl;
+ return result;
}
- mSender = regionp->getHost().getIPandPort();
- llinfos << "LLEventPoll initialized with sender " << mSender << llendl;
- makeRequest();
-}
-LLEventPoll::Impl::~Impl()
-{
- lldebugs << "LLEventPoll::Impl::~Impl <" << mCount << "> "
- << mPollURL << llendl;
-}
-
-void LLEventPoll::Impl::makeRequest()
-{
- LLSD request;
- request["ack"] = mAcknowledge;
- request["done"] = mDone;
-
- lldebugs << "LLEventPoll::Impl::makeRequest <" << mCount << "> ack = "
- << LLSDXMLStreamer(mAcknowledge) << llendl;
- LLHTTPClient::post(mPollURL, request, mPtr);
-}
+ void LLEventPollResponder::stop()
+ {
+ llinfos << "LLEventPollResponder::stop <" << mCount << "> "
+ << mPollURL << llendl;
+ // there should be a way to stop a LLHTTPClient request in progress
+ mDone = true;
+ }
-void LLEventPoll::Impl::handleMessage(const LLSD& content)
-{
- std::string msg_name = content["message"];
- LLSD message;
- message["sender"] = mSender;
- message["body"] = content["body"];
- LLMessageSystem::dispatch(msg_name, message);
-}
+ int LLEventPollResponder::sCount = 0;
-//virtual
-void LLEventPoll::Impl::error(U32 status, const std::string& reason)
-{
- if (mDone) return;
+ LLEventPollResponder::LLEventPollResponder(const std::string& pollURL, const LLHost& sender)
+ : mDone(false),
+ mPollURL(pollURL),
+ mCount(++sCount)
+ {
+ //extract host and port of simulator to set as sender
+ LLViewerRegion *regionp = gAgent.getRegion();
+ if (!regionp)
+ {
+ llerrs << "LLEventPoll initialized before region is added." << llendl;
+ }
+ mSender = sender.getIPandPort();
+ llinfos << "LLEventPoll initialized with sender " << mSender << llendl;
+ makeRequest();
+ }
- if(status != 499)
+ LLEventPollResponder::~LLEventPollResponder()
{
- llwarns << "LLEventPoll::Impl::error: <" << mCount << "> got "
- << status << ": " << reason
- << (mDone ? " -- done" : "") << llendl;
stop();
- return;
+ lldebugs << "LLEventPollResponder::~Impl <" << mCount << "> "
+ << mPollURL << llendl;
}
- makeRequest();
-}
+ void LLEventPollResponder::makeRequest()
+ {
+ LLSD request;
+ request["ack"] = mAcknowledge;
+ request["done"] = mDone;
+
+ lldebugs << "LLEventPollResponder::makeRequest <" << mCount << "> ack = "
+ << LLSDXMLStreamer(mAcknowledge) << llendl;
+ LLHTTPClient::post(mPollURL, request, this);
+ }
-//virtual
-void LLEventPoll::Impl::result(const LLSD& content)
-{
- lldebugs << "LLEventPoll::Impl::result <" << mCount << ">"
- << (mDone ? " -- done" : "") << llendl;
-
- if (mDone) return;
-
- mAcknowledge = content["id"];
- LLSD events = content["events"];
-
- if(mAcknowledge.isUndefined())
+ void LLEventPollResponder::handleMessage(const LLSD& content)
{
- llwarns << "LLEventPoll::Impl: id undefined" << llendl;
+ std::string msg_name = content["message"];
+ LLSD message;
+ message["sender"] = mSender;
+ message["body"] = content["body"];
+ LLMessageSystem::dispatch(msg_name, message);
}
-
- llinfos << "LLEventPoll::Impl::completed <" << mCount << "> " << events.size() << "events (id "
- << LLSDXMLStreamer(mAcknowledge) << ")" << llendl;
-
- LLSD::array_const_iterator i = events.beginArray();
- LLSD::array_const_iterator end = events.endArray();
- for (; i != end; ++i)
+
+ //virtual
+ void LLEventPollResponder::error(U32 status, const std::string& reason)
{
- if (i->has("message"))
+ if (mDone) return;
+
+ if(status != 499)
{
- handleMessage(*i);
+ llwarns << "LLEventPollResponder::error: <" << mCount << "> got "
+ << status << ": " << reason
+ << (mDone ? " -- done" : "") << llendl;
+ stop();
+ return;
}
+
+ makeRequest();
}
-
- makeRequest();
+
+ //virtual
+ void LLEventPollResponder::result(const LLSD& content)
+ {
+ lldebugs << "LLEventPollResponder::result <" << mCount << ">"
+ << (mDone ? " -- done" : "") << llendl;
+
+ if (mDone) return;
+
+ if (!content.get("events") ||
+ !content.get("id"))
+ {
+ llwarns << "received event poll with no events or id key" << llendl;
+ return;
+ }
+
+ mAcknowledge = content["id"];
+ LLSD events = content["events"];
+
+ if(mAcknowledge.isUndefined())
+ {
+ llwarns << "LLEventPollResponder: id undefined" << llendl;
+ }
+
+ llinfos << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id "
+ << LLSDXMLStreamer(mAcknowledge) << ")" << llendl;
+
+ LLSD::array_const_iterator i = events.beginArray();
+ LLSD::array_const_iterator end = events.endArray();
+ for (; i != end; ++i)
+ {
+ if (i->has("message"))
+ {
+ handleMessage(*i);
+ }
+ }
+
+ makeRequest();
+ }
}
-LLEventPoll::LLEventPoll(const std::string& pollURL)
- : impl(Impl::start(pollURL))
+LLEventPoll::LLEventPoll(const std::string& pollURL, const LLHost& sender)
+ : mImpl(LLEventPollResponder::start(pollURL, sender))
{ }
LLEventPoll::~LLEventPoll()
{
- impl.stop();
}
diff --git a/indra/newview/lleventpoll.h b/indra/newview/lleventpoll.h
index c2d798360f..a9c9d2ceab 100644
--- a/indra/newview/lleventpoll.h
+++ b/indra/newview/lleventpoll.h
@@ -9,11 +9,13 @@
#ifndef LL_LLEVENTPOLL_H
#define LL_LLEVENTPOLL_H
+#include "llhttpclient.h"
+
class LLEventPoll
///< implements the viewer side of server-to-viewer pushed events.
{
public:
- LLEventPoll(const std::string& pollURL);
+ LLEventPoll(const std::string& pollURL, const LLHost& sender);
///< Start polling the URL.
virtual ~LLEventPoll();
@@ -21,8 +23,7 @@ public:
private:
- class Impl;
- Impl& impl;
+ LLHTTPClient::ResponderPtr mImpl;
};
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index c34f14a813..f7aa4d4251 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2092,173 +2092,6 @@ void LLInventoryModel::registerCallbacks(LLMessageSystem* msg)
msg->setHandlerFunc("FetchInventoryReply", processFetchInventoryReply);
}
-/*
-//struct LLUpdateInventoryInfo
-{
- LLString mFilenameAndPath;
- BOOL mIsComplete;
-};
-
-// static
-void LLInventoryModel::processInventoryUpdate(LLMessageSystem* msg, void**)
-{
- lldebugs << "LLInventoryModel::processInventoryUpdate()" << llendl;
- LLUUID agent_id;
- msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_AgentID, agent_id);
- if(agent_id != gAgent.getID())
- {
- llwarns << "Got an inventory update for the wrong agent." << llendl;
- return;
- }
-
- BOOL is_complete;
- msg->getBOOLFast(_PREHASH_InventoryData, _PREHASH_IsComplete, is_complete);
- char filename[MAX_STRING];
- msg->getStringFast(_PREHASH_InventoryData, _PREHASH_Filename, MAX_STRING, filename);
-
- LLUpdateInventoryInfo* info = new LLUpdateInventoryInfo;
- info->mFilenameAndPath = gDirUtilp->getExpandedFilename( LL_PATH_TEMP, filename );
- info->mIsComplete = is_complete;
-
- gXferManager->requestFile(info->mFilenameAndPath,
- filename,
- LL_PATH_CACHE, // The remote file is in the data directory
- gUserServer,
- TRUE, // Delete the remote file after the transfer
- processInventoryFile,
- (void*)info,
- LLXferManager::HIGH_PRIORITY);
-}
-
-// static
-void LLInventoryModel::processInventoryFile(void** user_data, S32 error_code)
-{
- llinfos << "LLInventoryModel::processInventoryFile()" << llendl;
- //gInventory.dumpInventory();
- LLUpdateInventoryInfo* info = (LLUpdateInventoryInfo*)user_data;
- if(info && (0 == error_code))
- {
- if(info->mIsComplete)
- {
- if(gInventory.isLoaded())
- {
- // it's a complete update, and we've already loaded
- // everything. Therefore, we need to blow away
- // everything.
- gInventory.empty();
- }
- else
- {
- // We want to merge with anything that's happened
- // before the load. Therefore, we only want to get rid
- // of the root category.
- gInventory.deleteObject(gAgent.getInventoryRootID());
- }
- }
-
- // decompress if necessary
- const char* filename = info->mFilenameAndPath.c_str();
- const char* ext = filename + strlen(filename) - 6;
- char dst_filename[LL_MAX_PATH];
- if(0 == strnicmp(ext, "gz", 2))
- {
- // it's a gz file. decmpress it.
- dst_filename[0] = '\0';
- strncat(dst_filename, filename, (ext - filename));
- strcat(dst_filename, "tmp");
- BOOL success = gunzip_file(filename, dst_filename);
- LLFile::remove(filename);
- if(!success)
- {
- llwarns << "Error loading inventory file. Return code: " << error_code << llendl;
- LLNotifyBox::showXml("InventoryNetworkCorruption");
- goto exit;
- }
- filename = dst_filename;
- }
-
-#ifdef DIFF_INVENTORY_FILES
- char agent_id_string[UUID_STR_LENGTH];
- char inventory_filename[LL_MAX_PATH];
- gAgent.getID().toString(agent_id_string);
- sprintf(inventory_filename, CACHE_FORMAT_STRING, gDirUtilp->getExpandedFilename(LL_PATH_CACHE,agent_id_string).c_str());
- char buffer[MAX_STRING];
- sprintf(buffer,
- "c:/cygwin/bin/diff %s %s",
- inventory_filename,
- filename);
- llinfos << buffer << llendl;
- system(buffer);
-
-#endif
-
- // load it all up.
- gInventory.loadFromFile(filename);
- gInventory.buildParentChildMap();
- //gInventory.recalculateCloneInformation();
- gInventory.addChangedMask(LLInventoryObserver::ALL);
- if(info->mIsComplete)
- {
- // Set loaded to true if it's a complete set because it's
- // poosible for someone to accept an inventory category
- // before they have their complete inventory. If we marked
- // it loaded at that point, when the real inventory
- // arrived, it would erase (on the client anyway) the
- // existence of that inventory.
- gInventory.mIsLoaded = TRUE;
-
- //retrieveIM(gMessageSystem);
- llinfos << "complete inventory update" << llendl;
-
- // If we promised you a message on load, here it is
- if (gViewerStats->getStat(LLViewerStats::ST_INVENTORY_TOO_LONG) > 0.0)
- {
- LLNotifyBox::showXml("InventoryLoaded");
- }
- }
- else
- {
- llinfos << "incomplete inventory update" << llendl;
- }
- gInventory.notifyObservers();
- LLFile::remove(filename);
- }
- else
- {
- llwarns << "Eror loading inventory file. Return code: " << error_code
- << llendl;
- if(error_code == LL_ERR_TCP_TIMEOUT)
- {
- //llwarns << "Re-requesting inventory" << llendl;
- //gInventory.requestFromServer(gAgent.getID());
- }
- }
-
-exit:
- delete info;
- //gInventory.dumpInventory();
-}
-
-// static
-void LLInventoryModel::processUseCachedInventory(LLMessageSystem* msg, void**)
-{
- llinfos << "LLInventoryModel::processUseCachedInventory()" << llendl;
- char agent_id_string[UUID_STR_LENGTH];
- gAgent.getID().toString(agent_id_string);
- char filename[LL_MAX_PATH];
- sprintf(filename, CACHE_FORMAT_STRING, gDirUtilp->getExpandedFilename(LL_PATH_CACHE,agent_id_string).c_str());
- // We want to merge with anything that's happened before the
- // load. Therefore, we only want to get rid of the root category.
- gInventory.deleteObject(gAgent.getInventoryRootID());
- gInventory.loadFromFile(filename);
- gInventory.buildParentChildMap();
- //gInventory.recalculateCloneInformation();
- gInventory.addChangedMask(LLInventoryObserver::ALL);
- gInventory.mIsLoaded = TRUE;
- gInventory.notifyObservers();
- //retrieveIM();
-}
-*/
// static
void LLInventoryModel::processUpdateCreateInventoryItem(LLMessageSystem* msg, void**)
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 274da6d3d1..0ab674dfcd 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3668,6 +3668,7 @@ void LLSelectMgr::sendDelink()
// Hinges
//----------------------------------------------------------------------
+/*
void LLSelectMgr::sendHinge(U8 type)
{
if (!mSelectedObjects->getNumNodes())
@@ -3697,7 +3698,7 @@ void LLSelectMgr::sendDehinge()
packObjectLocalID,
NULL,
SEND_ONLY_ROOTS);
-}
+}*/
void LLSelectMgr::sendSelect()
{
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 33c8371cb7..283516671d 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -449,8 +449,8 @@ public:
void sendDropAttachment();
void sendLink();
void sendDelink();
- void sendHinge(U8 type);
- void sendDehinge();
+ //void sendHinge(U8 type);
+ //void sendDehinge();
void sendSelect();
void requestObjectPropertiesFamily(LLViewerObject* object); // asks sim for creator, permissions, resources, etc.
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index cce0d17e96..be6756ad98 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -30,6 +30,7 @@
#include "llerrorcontrol.h"
#include "llfiltersd2xmlrpc.h"
#include "llfocusmgr.h"
+#include "llhttpsender.h"
#include "imageids.h"
#include "lllandmark.h"
#include "llloginflags.h"
@@ -203,7 +204,6 @@ BOOL is_hex_string(U8* str, S32 len);
void show_first_run_dialog();
void first_run_dialog_callback(S32 option, void* userdata);
void set_startup_status(const F32 frac, const char* string, const char* msg);
-void on_userserver_name_resolved( BOOL success, const LLString& host_name, U32 ip, void* userdata );
void login_alert_status(S32 option, void* user_data);
void update_app(BOOL mandatory, const std::string& message);
void update_dialog_callback(S32 option, void *userdata);
@@ -216,7 +216,6 @@ void dialog_choose_gender_first_start();
void callback_choose_gender(S32 option, void* userdata);
void init_start_screen(S32 location_id);
void release_start_screen();
-void process_connect_to_userserver(LLMessageSystem* msg, void**);
void reset_login();
//
@@ -226,6 +225,21 @@ void reset_login();
//
// local classes
//
+
+namespace
+{
+ class LLNullHTTPSender : public LLHTTPSender
+ {
+ virtual void send(const LLHost& host,
+ const char* message, const LLSD& body,
+ LLHTTPClient::ResponderPtr response) const
+ {
+ llwarns << " attemped to send " << message << " to " << host
+ << " with null sender" << llendl;
+ }
+ };
+}
+
class LLGestureInventoryFetchObserver : public LLInventoryFetchObserver
{
public:
@@ -402,7 +416,7 @@ BOOL idle_startup()
port = gSavedSettings.getU32("ConnectionPort");
}
- LLMessageConfig::initClass("viewer", gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
+ LLHTTPSender::setDefaultSender(new LLNullHTTPSender());
if(!start_messaging_system(
message_template_path,
port,
@@ -415,6 +429,7 @@ BOOL idle_startup()
std::string msg = llformat("Unable to start networking, error %d", gMessageSystem->getErrorCode());
app_early_exit(msg);
}
+ LLMessageConfig::initClass("viewer", gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
}
else
{
@@ -432,9 +447,13 @@ BOOL idle_startup()
msg->setExceptionFunc(MX_PACKET_TOO_SHORT,
invalid_message_callback,
NULL);
- msg->setExceptionFunc(MX_RAN_OFF_END_OF_PACKET,
+
+ // running off end of a packet is now valid in the case
+ // when a reader has a newer message template than
+ // the sender
+ /*msg->setExceptionFunc(MX_RAN_OFF_END_OF_PACKET,
invalid_message_callback,
- NULL);
+ NULL);*/
msg->setExceptionFunc(MX_WROTE_PAST_BUFFER_SIZE,
invalid_message_callback,
NULL);
@@ -456,7 +475,7 @@ BOOL idle_startup()
gXferManager->setUseAckThrottling(TRUE);
gXferManager->setAckThrottleBPS(xfer_throttle_bps);
}
- gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS, gUserServer);
+ gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS);
msg->mPacketRing.setDropPercentage(gPacketDropPercentage);
if (gInBandwidth != 0.f)
@@ -758,7 +777,6 @@ BOOL idle_startup()
gSavedSettings.setS32("ServerChoice", gUserServerChoice);
if (gUserServerChoice == USERSERVER_OTHER)
{
- gUserServer.setHostByName( server_label.c_str() );
snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */
}
}
@@ -825,231 +843,15 @@ BOOL idle_startup()
// color init must be after saved settings loaded
init_colors();
- // Request userserver domain name
- set_startup_status(0.05f, "Finding Server Domain Name...", NULL);
-
- // We're prematurely switching out of this state because the
- // userserver name resolver can potentiallly occur before reaching the end of the
- // switch statement. Also, if it's done at the bottom, sometimes we will
- // skip the userserver resolved step (in the local cases) - djs 09/24/03
- gStartupState++;
- timeout.reset();
-
- switch( gUserServerChoice )
- {
- case USERSERVER_AGNI:
- gInProductionGrid = TRUE;
- case USERSERVER_DMZ:
- case USERSERVER_ADITI:
- case USERSERVER_SIVA:
- case USERSERVER_SHAKTI:
- case USERSERVER_DURGA:
- case USERSERVER_SOMA:
- case USERSERVER_VAAK:
- case USERSERVER_GANGA:
- case USERSERVER_UMA:
- {
- const char* host_name = gUserServerDomainName[gUserServerChoice].mName;
- snprintf(gUserServerName, MAX_STRING, "%s", host_name); /* Flawfinder: ignore */
- llinfos << "Resolving " <<
- gUserServerDomainName[gUserServerChoice].mLabel <<
- " userserver domain name " << host_name << llendl;
-
- BOOL requested_domain_name = gAsyncHostByName.startRequest( host_name, on_userserver_name_resolved, NULL );
- if( !requested_domain_name )
- //BOOL resolved_domain_name = gUserServer.setHostByName( host_name );
- //if( !resolved_domain_name )
- {
- llwarns << "setHostByName failed" << llendl;
-
- LLStringBase<char>::format_map_t args;
- args["[HOST_NAME]"] = host_name;
-
- gViewerWindow->alertXml("UnableToConnect", args, login_alert_done );
- reset_login();
- return FALSE;
- }
- break;
- }
-
- case USERSERVER_LOCAL:
- llinfos << "Using local userserver" << llendl;
- gUserServer.setAddress( LOOPBACK_ADDRESS_STRING );
- gStartupState = STATE_USERSERVER_RESOLVED;
- break;
-
- case USERSERVER_OTHER:
- llinfos << "Userserver set explicitly" << llendl;
- gStartupState = STATE_USERSERVER_RESOLVED;
- break;
-
- case USERSERVER_NONE:
- default:
- llerrs << "No userserver IP address specified" << llendl;
- break;
- }
- return do_normal_idle;
- }
-
- if (STATE_RESOLVING_USERSERVER == gStartupState)
- {
- // Don't do anything. Wait for LL_WM_HOST_RESOLVED which is handled by LLAsyncHostByName,
- // which calls on_userserver_name_resolved, which will push us to the next state.
- if (timeout.getElapsedTimeF32() > TIMEOUT_SECONDS*3.f)
- {
- // Cancel the pending asynchostbyname request
-
- gViewerWindow->alertXml("CanNotFindServer",
- login_alert_status, NULL);
-
- // Back up to login screen
- reset_login();
- gViewerStats->incStat(LLViewerStats::ST_LOGIN_TIMEOUT_COUNT);
- }
- ms_sleep(1);
- return do_normal_idle;
- }
-
- if (STATE_USERSERVER_RESOLVED == gStartupState)
- {
- if (!gUserServer.isOk())
- {
- LLStringBase<char>::format_map_t args;
- args["[IP_ADDRESS]"] = u32_to_ip_string( gUserServer.getAddress() );
-
- gViewerWindow->alertXml("PleaseSelectServer", args, login_alert_done );
-
- reset_login();
- return FALSE;
- }
-
- write_debug("Userserver: ");
- char tmp_str[256]; /* Flawfinder: ignore */
- gUserServer.getIPString(tmp_str, 256);
- write_debug(tmp_str);
- write_debug("\n");
-
- gStartupState++;
- }
-
- if (STATE_MESSAGE_TEMPLATE_SEND == gStartupState)
- {
- set_startup_status(0.10f, "Verifying protocol version...", NULL);
-
- LLHost mt_host;
- if (!gRunLocal)
- {
- // open up user server circuit (trusted)
- gMessageSystem->enableCircuit(gUserServer, TRUE);
- mt_host = gUserServer;
- }
- else
- {
- mt_host = gAgentSimHost;
- }
-
- llinfos << "Verifying message template..." << llendl;
- LLMessageSystem::sendSecureMessageTemplateChecksum(mt_host);
-
- timeout.reset();
- gStartupState++;
- return do_normal_idle;
- }
-
- if (STATE_MESSAGE_TEMPLATE_WAIT == gStartupState)
- {
- LLMessageSystem* msg = gMessageSystem;
- while (msg->checkAllMessages(gFrameCount, gServicePump))
- {
- if (msg->isTemplateConfirmed())
- {
- BOOL update_available = FALSE;
- BOOL mandatory = FALSE;
-
- if (!LLMessageSystem::doesTemplateMatch())
- {
- // Mandatory update -- message template checksum doesn't match
- update_available = TRUE;
- mandatory = TRUE;
- }
-
- BOOL quit = FALSE;
- if (update_available)
- {
- if (show_connect_box)
- {
- update_app(mandatory, "");
- gStartupState = STATE_UPDATE_CHECK;
- return FALSE;
- }
- else
- {
- quit = TRUE;
- }
- }
-
- // Bail out and clean up circuit
- if (quit)
- {
- msg->newMessageFast(_PREHASH_CloseCircuit);
- msg->sendMessage( msg->getSender() );
- app_force_quit(NULL);
- return FALSE;
- }
-
- // If we get here, we've got a compatible message template
- if (!mandatory)
- {
- llinfos << "Message template is current!" << llendl;
- }
- gStartupState = STATE_LOGIN_AUTH_INIT;
- timeout.reset();
- // unregister with the message system so it knows we're no longer expecting this message
- msg->setHandlerFuncFast(_PREHASH_TemplateChecksumReply, NULL, NULL);
-
- msg->newMessageFast(_PREHASH_CloseCircuit);
- msg->sendMessage(gUserServer);
- msg->disableCircuit(gUserServer);
- if (gRunLocal)
- {
- msg->enableCircuit(gAgentSimHost, TRUE);
-
- // Don't use a session token, and generate a random user id
- gAgentID.generate();
- gAgentSessionID = LLUUID::null;
-
- // Skip userserver queries.
- gStartupState = STATE_WORLD_INIT;
- }
- }
- }
- gMessageSystem->processAcks();
-
- if (timeout.getElapsedTimeF32() > TIMEOUT_SECONDS)
- {
- if (timeout_count > MAX_TIMEOUT_COUNT)
- {
- gViewerWindow->alertXml("SystemMayBeDown",
- login_alert_status,
- NULL);
-
- // Back up to login screen
- reset_login();
- gViewerStats->incStat(LLViewerStats::ST_LOGIN_TIMEOUT_COUNT);
- }
- else
- {
- llinfos << "Resending on timeout" << llendl;
- gStartupState--;
- timeout_count++;
- }
- }
+ // skipping over STATE_UPDATE_CHECK because that just waits for input
+ gStartupState = STATE_LOGIN_AUTH_INIT;
return do_normal_idle;
}
if (STATE_UPDATE_CHECK == gStartupState)
{
+ // wait for user to give input via dialog box
return do_normal_idle;
}
@@ -1657,9 +1459,7 @@ BOOL idle_startup()
//
// Initialize classes w/graphics stuff.
//
- gImageList.doPrefetchImages();
- update_texture_fetch();
-
+ gImageList.doPrefetchImages();
LLSurface::initClasses();
LLFace::initClass();
@@ -1690,6 +1490,7 @@ BOOL idle_startup()
LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle);
llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl;
+ gStartupState = STATE_SEED_GRANTED_WAIT;
regionp->setSeedCapability(first_sim_seed_cap);
// Set agent's initial region to be the one we just created.
@@ -1705,9 +1506,32 @@ BOOL idle_startup()
// VEFFECT: Login
gWorldp->addRegion(0, gAgentSimHost);
gAgent.setRegion(gWorldp->getRegionFromHandle(0));
+
+ gStartupState = STATE_SEED_CAP_GRANTED;
}
display_startup();
+ return do_normal_idle;
+ }
+
+
+ //---------------------------------------------------------------------
+ // Wait for Seed Cap Grant
+ //---------------------------------------------------------------------
+ if(STATE_SEED_GRANTED_WAIT == gStartupState)
+ {
+ llinfos << "Waiting for seed grant ...." << llendl;
+ return do_normal_idle;
+ }
+
+
+ //---------------------------------------------------------------------
+ // Seed Capability Granted
+ // no newMessage calls should happen before this point
+ //---------------------------------------------------------------------
+ if (STATE_SEED_CAP_GRANTED == gStartupState)
+ {
+ update_texture_fetch();
// Initialize UI
if (!gNoRender)
@@ -2175,21 +1999,6 @@ BOOL idle_startup()
return do_normal_idle;
}
- //---------------------------------------------------------------------
- // Assert agent to userserver
- //---------------------------------------------------------------------
- if (STATE_CONNECT_USERSERVER == gStartupState)
- {
- LLMessageSystem* msg = gMessageSystem;
- msg->enableCircuit(gUserServer, TRUE);
- msg->newMessage("ConnectAgentToUserserver");
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->sendReliable(gUserServer);
- gStartupState++;
- return do_normal_idle;
- }
//---------------------------------------------------------------------
// Misc
@@ -2314,9 +2123,6 @@ BOOL idle_startup()
msg->setHandlerFuncFast(_PREHASH_AttachedSound, process_attached_sound);
msg->setHandlerFuncFast(_PREHASH_AttachedSoundGainChange, process_attached_sound_gain_change);
//msg->setHandlerFuncFast(_PREHASH_AttachedSoundCutoffRadius, process_attached_sound_cutoff_radius);
- msg->setHandlerFunc(
- "ConnectToUserserver",
- process_connect_to_userserver);
llinfos << "Initialization complete" << llendl;
gInitializationComplete = TRUE;
@@ -2756,31 +2562,6 @@ void set_startup_status(const F32 frac, const char *string, const char* msg)
gViewerWindow->setProgressMessage(msg);
}
-void on_userserver_name_resolved( BOOL success, const LLString& host_name, U32 ip, void* userdata )
-{
- if( STATE_RESOLVING_USERSERVER != gStartupState )
- {
- llwarns << "Userserver name callback returned during invalid state!" << llendl;
- return;
- }
-
- if( success )
- {
- gUserServer.setAddress( ip );
- llinfos << "...Userserver resolved to " << gUserServer << llendl;
- gStartupState = STATE_USERSERVER_RESOLVED;
- }
- else
- {
- llwarns << "setHostByName failed" << llendl;
-
- LLStringBase<char>::format_map_t args;
- args["[HOST_NAME]"] = host_name;
- gViewerWindow->alertXml("SetByHostFail", args, login_alert_done );
- reset_login();
- }
-}
-
void login_alert_status(S32 option, void* user_data)
{
if (0 == option)
@@ -2904,8 +2685,6 @@ void update_dialog_callback(S32 option, void *userdata)
LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);
#if LL_WINDOWS
- char ip[MAX_STRING]; /* Flawfinder: ignore */
-
update_exe_path = gDirUtilp->getTempFilename();
if (update_exe_path.empty())
{
@@ -2932,7 +2711,6 @@ void update_dialog_callback(S32 option, void *userdata)
app_force_quit(NULL);
return;
}
- u32_to_ip_string(gUserServer.getAddress(), ip);
// if a sim name was passed in via command line parameter (typically through a SLURL)
if ( LLURLSimString::sInstance.mSimString.length() )
@@ -3060,7 +2838,7 @@ void register_viewer_callbacks(LLMessageSystem* msg)
msg->setHandlerFuncFast(_PREHASH_MeanCollisionAlert, process_mean_collision_alert_message, NULL);
msg->setHandlerFunc("ViewerFrozenMessage", process_frozen_message);
- msg->setHandlerFuncFast(_PREHASH_RequestAvatarInfo, process_avatar_info_request);
+ //msg->setHandlerFuncFast(_PREHASH_RequestAvatarInfo, process_avatar_info_request);
msg->setHandlerFuncFast(_PREHASH_NameValuePair, process_name_value);
msg->setHandlerFuncFast(_PREHASH_RemoveNameValuePair, process_remove_name_value);
msg->setHandlerFuncFast(_PREHASH_AvatarAnimation, process_avatar_animation);
@@ -3924,19 +3702,6 @@ void release_start_screen()
gStartImageGL = NULL;
}
-void process_connect_to_userserver(LLMessageSystem* msg, void**)
-{
- // Sent unreliably since if we've become disconnected, the
- // userserver will get back to us eventually. By sending reliable,
- // we also may accidently induce two separate validations under
- // conditions where the userserver is already lagged.
- msg->newMessage("ConnectAgentToUserserver");
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->sendMessage(gUserServer);
-}
-
bool LLStartUp::canGoFullscreen()
{
return gStartupState >= STATE_WORLD_INIT;
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 75a525f241..4137c62a92 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -26,27 +26,20 @@ enum EStartupState{
STATE_LOGIN_SHOW,
STATE_LOGIN_WAIT,
STATE_LOGIN_CLEANUP,
- STATE_RESOLVING_USERSERVER,
- STATE_USERSERVER_RESOLVED,
- STATE_MESSAGE_TEMPLATE_SEND,
- STATE_MESSAGE_TEMPLATE_WAIT,
STATE_UPDATE_CHECK,
STATE_LOGIN_AUTH_INIT,
STATE_LOGIN_AUTHENTICATE,
STATE_LOGIN_NO_DATA_YET,
STATE_LOGIN_DOWNLOADING,
STATE_LOGIN_PROCESS_RESPONSE,
- //STATE_USERSERVER_SEND,
- //STATE_USERSERVER_WAIT,
- //STATE_LOCATION_SEND,
- //STATE_LOCATION_WAIT,
STATE_WORLD_INIT,
+ STATE_SEED_GRANTED_WAIT,
+ STATE_SEED_CAP_GRANTED,
STATE_QUICKTIME_INIT,
STATE_WORLD_WAIT,
STATE_AGENT_SEND,
STATE_AGENT_WAIT,
STATE_INVENTORY_SEND,
- STATE_CONNECT_USERSERVER,
STATE_MISC,
STATE_PRECACHE,
STATE_WEARABLES_WAIT,
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index 69de1142a4..051376d94f 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -548,6 +548,7 @@ void LLToolBrushLand::undo()
}
// static
+/*
void LLToolBrushLand::redo()
{
for(LLViewerRegion* regionp = mLastAffectedRegions.getFirstData();
@@ -560,7 +561,7 @@ void LLToolBrushLand::redo()
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
gMessageSystem->sendMessage(regionp->getHost());
}
-}
+}*/
// static
bool LLToolBrushLand::canTerraform(LLViewerRegion* regionp) const
diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h
index 3cae7559a3..81b2c61ef5 100644
--- a/indra/newview/lltoolbrush.h
+++ b/indra/newview/lltoolbrush.h
@@ -53,7 +53,7 @@ public:
virtual void undo();
virtual BOOL canUndo() { return TRUE; }
- virtual void redo();
+ //virtual void redo();
virtual BOOL canRedo() { return FALSE; }
diff --git a/indra/newview/llviewerjointmesh_sse.cpp b/indra/newview/llviewerjointmesh_sse.cpp
index 579c5d2687..d1ded78f06 100644
--- a/indra/newview/llviewerjointmesh_sse.cpp
+++ b/indra/newview/llviewerjointmesh_sse.cpp
@@ -31,8 +31,6 @@
#if LL_VECTORIZE
-static LLV4Matrix4 sJointMat[32];
-
inline void matrix_translate(LLV4Matrix4& m, const LLMatrix4* w, const LLVector3& j)
{
m.mV[VX] = _mm_loadu_ps(w->mMatrix[VX]);
@@ -47,6 +45,9 @@ inline void matrix_translate(LLV4Matrix4& m, const LLMatrix4* w, const LLVector3
// static
void LLViewerJointMesh::updateGeometrySSE(LLFace *face, LLPolyMesh *mesh)
{
+ // This cannot be a file-level static because it will be initialized
+ // before main() using SSE code, which will crash on non-SSE processors.
+ static LLV4Matrix4 sJointMat[32];
LLDynamicArray<LLJointRenderData*>& joint_data = mesh->getReferenceMesh()->mJointRenderData;
//upload joint pivots/matrices
diff --git a/indra/newview/llviewerjointmesh_sse2.cpp b/indra/newview/llviewerjointmesh_sse2.cpp
index 9ef2b4692a..41f86d363f 100644
--- a/indra/newview/llviewerjointmesh_sse2.cpp
+++ b/indra/newview/llviewerjointmesh_sse2.cpp
@@ -9,6 +9,10 @@
* $License$
*/
+// Visual Studio required settings for this file:
+// Precompiled Headers OFF
+// Code Generation: SSE2
+
//-----------------------------------------------------------------------------
// Header Files
//-----------------------------------------------------------------------------
@@ -50,6 +54,9 @@ inline void matrix_translate(LLV4Matrix4& m, const LLMatrix4* w, const LLVector3
// static
void LLViewerJointMesh::updateGeometrySSE2(LLFace *face, LLPolyMesh *mesh)
{
+ // This cannot be a file-level static because it will be initialized
+ // before main() using SSE code, which will crash on non-SSE processors.
+ static LLV4Matrix4 sJointMat[32];
LLDynamicArray<LLJointRenderData*>& joint_data = mesh->getReferenceMesh()->mJointRenderData;
//upload joint pivots/matrices
diff --git a/indra/newview/llviewerjointmesh_vec.cpp b/indra/newview/llviewerjointmesh_vec.cpp
index 69ddad63fc..c04c323800 100644
--- a/indra/newview/llviewerjointmesh_vec.cpp
+++ b/indra/newview/llviewerjointmesh_vec.cpp
@@ -25,11 +25,10 @@
// Generic vectorized code, uses compiler defaults, works well for Altivec
// on PowerPC.
-static LLV4Matrix4 sJointMat[32];
-
// static
void LLViewerJointMesh::updateGeometryVectorized(LLFace *face, LLPolyMesh *mesh)
{
+ static LLV4Matrix4 sJointMat[32];
LLDynamicArray<LLJointRenderData*>& joint_data = mesh->getReferenceMesh()->mJointRenderData;
S32 j, joint_num, joint_end = joint_data.count();
LLV4Vector3 pivot;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 7ad4f1d70b..d6bfe66dc8 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -258,7 +258,7 @@ void handle_leave_group(void *);
// File Menu
const char* upload_pick(void* data);
void handle_upload(void* data);
-void handle_upload_object(void* data);
+//void handle_upload_object(void* data);
void handle_compress_image(void*);
BOOL enable_save_as(void *);
@@ -375,11 +375,11 @@ void slow_mo_animations(void *);
void handle_disconnect_viewer(void *);
void handle_stopall(void*);
-void handle_hinge(void*);
-void handle_ptop(void*);
-void handle_lptop(void*);
-void handle_wheel(void*);
-void handle_dehinge(void*);
+//void handle_hinge(void*);
+//void handle_ptop(void*);
+//void handle_lptop(void*);
+//void handle_wheel(void*);
+//void handle_dehinge(void*);
BOOL enable_dehinge(void*);
void handle_force_delete(void*);
void print_object_info(void*);
@@ -4530,36 +4530,36 @@ class LLToolsStopAllAnimations : public view_listener_t
}
};
-void handle_hinge(void*)
-{
- gSelectMgr->sendHinge(1);
-}
+//void handle_hinge(void*)
+//{
+// gSelectMgr->sendHinge(1);
+//}
-void handle_ptop(void*)
-{
- gSelectMgr->sendHinge(2);
-}
+//void handle_ptop(void*)
+//{
+// gSelectMgr->sendHinge(2);
+//}
-void handle_lptop(void*)
-{
- gSelectMgr->sendHinge(3);
-}
+//void handle_lptop(void*)
+//{
+// gSelectMgr->sendHinge(3);
+//}
-void handle_wheel(void*)
-{
- gSelectMgr->sendHinge(4);
-}
+//void handle_wheel(void*)
+//{
+// gSelectMgr->sendHinge(4);
+//}
-void handle_dehinge(void*)
-{
- gSelectMgr->sendDehinge();
-}
+//void handle_dehinge(void*)
+//{
+// gSelectMgr->sendDehinge();
+//}
-BOOL enable_dehinge(void*)
-{
- LLViewerObject* obj = gSelectMgr->getSelection()->getFirstEditableObject();
- return obj && !obj->isAttachment();
-}
+//BOOL enable_dehinge(void*)
+//{
+// LLViewerObject* obj = gSelectMgr->getSelection()->getFirstEditableObject();
+// return obj && !obj->isAttachment();
+//}
class LLEditEnableCut : public view_listener_t
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 600d7d3ca2..44f5cbb9db 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -186,6 +186,7 @@ const char* upload_pick(void* data)
return filename;
}
+/*
void handle_upload_object(void* data)
{
const char* filename = upload_pick(data);
@@ -195,7 +196,7 @@ void handle_upload_object(void* data)
LLFloaterImport* floaterp = new LLFloaterImport(filename);
gUICtrlFactory->buildFloater(floaterp, "floater_import.xml");
}
-}
+}*/
class LLFileUploadImage : public view_listener_t
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 9f034b6afd..7adfba7776 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2318,82 +2318,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
}
-/*
-void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data)
-{
-// LLFastTimer t(LLFastTimer::FTM_TEMP8);
-
- U64 handle;
- U32 ip;
- U16 port;
- LLUUID session_id;
-
- // Actually, the agent itself should process this message.
- // From a "AgentToNewRegion" message
- mesgsys->getIPAddrFast(_PREHASH_RegionData, _PREHASH_IP, ip);
- mesgsys->getIPPortFast(_PREHASH_RegionData, _PREHASH_Port, port);
- mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_Handle, handle);
- mesgsys->getUUIDFast(_PREHASH_RegionData, _PREHASH_SessionID, session_id);
-
- if (gAgent.getSessionID() != session_id)
- {
- llwarns << "Got AgentToNewRegion with invalid session ID, ignoring" << llendl;
- return;
- }
-
- LLViewerRegion *regionp;
-
- F32 x, y;
- from_region_handle(handle, &x, &y);
- regionp = gWorldp->getRegionFromHandle(handle);
- if (!regionp)
- {
- if (gAgent.getRegion())
- {
- llwarns << "current region " << gAgent.getRegion()->getOriginGlobal() << llendl;
- }
-
- llwarns << "Agent being sent to invalid home region: "
- << x << ":" << y
- << " current pos " << gAgent.getPositionGlobal()
- << llendl;
- do_disconnect("You were sent to an invalid region.");
- return;
-
- }
-
- if (regionp == gAgent.getRegion())
- {
- llinfos << "Agent being sent to current home region, skipping." << llendl;
- return;
- }
-
-
- llinfos << "AgentToNewRegion - being sent to " << x << ":" << y
- << ""
-
- LLVector3 shift_vector = regionp->getPosRegionFromGlobal(gAgent.getRegion()->getOriginGlobal());
-
- gAgent.setRegion(regionp);
-
- gObjectList.shiftObjects(shift_vector);
-
- llinfos << "Changing home region to " << x << ":" << y << llendl;
-
- // send camera update to new region
-
- send_agent_update(TRUE, TRUE);
-
- // set our upstream asset provider to the new simulator
- LLHost upstream(ip, port);
- gAssetStorage->setUpstream(upstream);
- gCacheName->setUpstream(upstream);
-
- // Not needed, as simulator will always send request as it creates the new
- // agent in the new region.
- // send_current_avatar_info();
-}
-*/
// Simulator we're on is informing the viewer that the agent
// is starting to teleport (perhaps to another sim, perhaps to the
@@ -3536,6 +3460,7 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
// This info is requested by the simulator when the agent first logs in
// or when it moves into a simulator in which it did not already have
// a child agent.
+/*
void process_avatar_info_request(LLMessageSystem *mesgsys, void **user_data)
{
llinfos << "process_avatar_info_request()" << llendl;
@@ -3543,7 +3468,7 @@ void process_avatar_info_request(LLMessageSystem *mesgsys, void **user_data)
// Send the avatar appearance (parameters and texture entry UUIDs)
gAgent.sendAgentSetAppearance();
send_agent_update(TRUE, TRUE);
-}
+}*/
void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 9eb2d9fcdd..4717c30f7a 100644
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -39,8 +39,6 @@ struct LLUserServerData
const char* mHelperURI;
};
-extern LLHost gUserServer;
-
extern F32 gPacketDropPercentage;
extern F32 gInBandwidth;
extern F32 gOutBandwidth;
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 556e0bc79b..21365fa3b9 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1038,7 +1038,9 @@ public:
// for parcel buys
S32 mParcelID;
-
+ S32 mPrice;
+ S32 mArea;
+
// for land claims
F32 mWest;
F32 mSouth;
@@ -1096,6 +1098,8 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
info->mIsClaim = is_claim;
info->mRemoveContribution = remove_contribution;
info->mHost = region->getHost();
+ info->mPrice = mCurrentParcel->getSalePrice();
+ info->mArea = mCurrentParcel->getArea();
if (!is_claim)
{
@@ -1141,6 +1145,12 @@ void LLViewerParcelMgr::sendParcelBuy(ParcelBuyInfo* info)
msg->addF32("East", info->mEast);
msg->addF32("North", info->mNorth);
}
+ else // ParcelBuy
+ {
+ msg->nextBlock("ParcelData");
+ msg->addS32("Price",info->mPrice);
+ msg->addS32("Area",info->mArea);
+ }
msg->sendReliable(info->mHost);
}
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 6fd31f3e72..7fed7ebe94 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -31,6 +31,7 @@
#include "llfloaterregioninfo.h"
#include "llhttpnode.h"
#include "llnetmap.h"
+#include "llstartup.h"
#include "llviewerobjectlist.h"
#include "llviewerparceloverlay.h"
#include "llvlmanager.h"
@@ -1156,6 +1157,10 @@ void LLViewerRegion::unpackRegionHandshake()
setBillableFactor(billable_factor);
setCacheID(cache_id);
+ LLUUID region_id;
+ msg->getUUID("RegionInfo2", "RegionID", region_id);
+ setRegionID(region_id);
+
LLVLComposition *compp = getComposition();
if (compp)
{
@@ -1232,6 +1237,11 @@ public:
{
llinfos << "BaseCapabilitiesComplete::error "
<< statusNum << ": " << reason << llendl;
+
+ if (STATE_SEED_GRANTED_WAIT == gStartupState)
+ {
+ gStartupState = STATE_SEED_CAP_GRANTED;
+ }
}
void result(const LLSD& content)
@@ -1243,6 +1253,11 @@ public:
llinfos << "BaseCapabilitiesComplete::result got capability for "
<< iter->first << llendl;
}
+
+ if (STATE_SEED_GRANTED_WAIT == gStartupState)
+ {
+ gStartupState = STATE_SEED_CAP_GRANTED;
+ }
}
static boost::intrusive_ptr<BaseCapabilitiesComplete> build(
@@ -1259,6 +1274,11 @@ private:
void LLViewerRegion::setSeedCapability(const std::string& url)
{
+ if (getCapability("Seed") == url)
+ {
+ llwarns << "Ignoring duplicate seed capability" << llendl;
+ return;
+ }
delete mEventPoll;
mEventPoll = NULL;
@@ -1286,23 +1306,18 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("ParcelVoiceInfoRequest");
capabilityNames.append("ChatSessionRequest");
+ llinfos << "posting to seed " << url << llendl;
+
LLHTTPClient::post(url, capabilityNames, BaseCapabilitiesComplete::build(this));
}
-static
-LLEventPoll* createViewerEventPoll(const std::string& url)
-{
- return new LLEventPoll(url);
-}
-
-
void LLViewerRegion::setCapability(const std::string& name, const std::string& url)
{
if(name == "EventQueueGet")
{
delete mEventPoll;
mEventPoll = NULL;
- mEventPoll = createViewerEventPoll(url);
+ mEventPoll = new LLEventPoll(url, getHost());
}
else if(name == "UntrustedSimulatorMessage")
{
@@ -1326,14 +1341,15 @@ std::string LLViewerRegion::getCapability(const std::string& name) const
void LLViewerRegion::logActiveCapabilities() const
{
+ int count = 0;
CapabilityMap::const_iterator iter;
- for (iter = mCapabilities.begin(); iter != mCapabilities.end(); iter++)
+ for (iter = mCapabilities.begin(); iter != mCapabilities.end(); iter++, count++)
{
if (!iter->second.empty())
{
- // llinfos << "Active capability is " << iter->first << llendl;
llinfos << iter->first << " URL is " << iter->second << llendl;
}
}
+ llinfos << "Dumped " << count << " entries." << llendl;
}
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 05c37fe08f..e971efeedf 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -176,6 +176,10 @@ public:
LLSurface &getLand() const { return *mLandp; }
+ // set and get the region id
+ const LLUUID& getRegionID() const { return mRegionID; }
+ void setRegionID(const LLUUID& region_id) { mRegionID = region_id; }
+
BOOL pointInRegionGlobal(const LLVector3d &point_global) const;
LLVector3 getPosRegionFromGlobal(const LLVector3d &point_global) const;
LLVector3 getPosRegionFromAgent(const LLVector3 &agent_pos) const;
@@ -250,6 +254,9 @@ protected:
U64 mHandle;
LLHost mHost;
+ // The unique ID for this region.
+ LLUUID mRegionID;
+
F32 mTimeDilation; // time dilation of physics simulation on simulator
// simulator name
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 1d2e9af3b6..c667ffabfc 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -17,6 +17,7 @@
#include "llviewercontrol.h"
#include "lldrawpool.h"
#include "llglheaders.h"
+#include "llhttpnode.h"
#include "llregionhandle.h"
#include "llsurface.h"
#include "llviewercamera.h"
@@ -742,15 +743,6 @@ void LLWorld::printPacketsLost()
<< " packets lost: " << cdp->getPacketsLost() << llendl;
}
}
-
- llinfos << "UserServer:" << llendl;
- llinfos << "-----------" << llendl;
-
- cdp = gMessageSystem->mCircuitInfo.findCircuit(gUserServer);
- if (cdp)
- {
- llinfos << gUserServer << " packets lost: " << cdp->getPacketsLost() << llendl;
- }
}
void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data)
@@ -1023,6 +1015,41 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
msg->sendReliable(sim);
}
+class LLEstablishAgentCommunication : public LLHTTPNode
+{
+ LOG_CLASS(LLEstablishAgentCommunication);
+public:
+ virtual void describe(Description& desc) const
+ {
+ desc.shortInfo("seed capability info for a region");
+ desc.postAPI();
+ desc.input(
+ "{ seed-capability: ..., sim-ip: ..., sim-port }");
+ desc.source(__FILE__, __LINE__);
+ }
+
+ virtual void post(ResponsePtr response, const LLSD& context, const LLSD& input) const
+ {
+ if (!input["body"].has("agent-id") ||
+ !input["body"].has("sim-ip-and-port") ||
+ !input["body"].has("seed-capability"))
+ {
+ llwarns << "invalid parameters" << llendl;
+ return;
+ }
+
+ LLHost sim(input["body"]["sim-ip-and-port"].asString());
+
+ LLViewerRegion* regionp = gWorldp->getRegion(sim);
+ if (!regionp)
+ {
+ llwarns << "Got EstablishAgentCommunication for unknown region "
+ << sim << llendl;
+ return;
+ }
+ regionp->setSeedCapability(input["body"]["seed-capability"]);
+ }
+};
// disable the circuit to this simulator
// Called in response to "DisableSimulator" message.
@@ -1075,8 +1102,6 @@ void send_agent_pause()
gMessageSystem->sendReliable(regionp->getHost());
}
- gMessageSystem->sendReliable(gUserServer);
-
gObjectList.mWasPaused = TRUE;
}
@@ -1102,10 +1127,11 @@ void send_agent_resume()
gMessageSystem->sendReliable(regionp->getHost());
}
- gMessageSystem->sendReliable(gUserServer);
-
// Reset the FPS counter to avoid an invalid fps
gViewerStats->mFPSStat.start();
}
+LLHTTPRegistration<LLEstablishAgentCommunication>
+ gHTTPRegistrationEstablishAgentCommunication(
+ "/message/EstablishAgentCommunication");
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 23a2c0b758..332b72fa54 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -20,6 +20,7 @@ class ViewerManifest(LLManifest):
super(ViewerManifest, self).construct()
self.exclude("*.svn*")
self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg")
+ self.path(src="../../etc/message.xml", dst="app_settings/message.xml")
if self.prefix(src="app_settings"):
self.exclude("logcontrol.xml")