diff --git a/etc/message.xml b/etc/message.xml index 847f483aa..04cdbc8f2 100644 --- a/etc/message.xml +++ b/etc/message.xml @@ -673,9 +673,6 @@ FetchInventoryDescendents false - WebFetchInventoryDescendents - true - FetchInventory true diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8004297fe..597f42634 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -235,7 +235,6 @@ set(viewer_SOURCE_FILES llfloatersnapshot.cpp llfloaterstats.cpp llfloatertelehub.cpp - llfloaterteleport.cpp llfloaterteleporthistory.cpp llfloatertest.cpp llfloatertools.cpp @@ -712,7 +711,6 @@ set(viewer_HEADER_FILES llfloatersnapshot.h llfloaterstats.h llfloatertelehub.h - llfloaterteleport.h llfloaterteleporthistory.h llfloatertest.h llfloatertools.h diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2613e7149..8e3c01011 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -425,8 +425,6 @@ LLAgent::LLAgent() : mAutoPilotRotationThreshold(0.f), mAutoPilotFinishedCallback(NULL), mAutoPilotCallbackData(NULL), - - mCapabilities(), mEffectColor(0.f, 1.f, 1.f, 1.f), @@ -7093,16 +7091,6 @@ void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void // before we had wearables, or that the database has gotten messed up. return; } - //else - //{ - // // OGPX HACK: OGP authentication does not pass back login-flags, - // // thus doesn't check for "gendered" flag - // // so this isn't an ideal place for this because the check in idle_startup in STATE_WEARABLES_WAIT - // // is happening *before* this call. That causes the welcomechoosesex dialog to be displayed - // // but I'm torn on removing this commented out code because I'm unsure how the initial wearables - // // code will work out. - // gAgent.setGenderChosen(TRUE); - //} //lldebugs << "processAgentInitialWearablesUpdate()" << llendl; // Add wearables @@ -8544,43 +8532,6 @@ void LLAgent::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_ } } -// OGPX - This code will change when capabilities get refactored. -// Right now this is used for capabilities that we get from OGP agent domain -void LLAgent::setCapability(const std::string& name, const std::string& url) -{ -#if 0 // OGPX : I think (hope?) we don't need this - // but I'm leaving it here commented out because I'm not quite - // sure why the region capabilities code had it wedged in setCap call - // Maybe the agent domain capabilities will need something like this as well - - if (name == "EventQueueGet") - { - delete mEventPoll; - mEventPoll = NULL; - mEventPoll = new LLEventPoll(url, getHost()); - } - else if (name == "UntrustedSimulatorMessage") - { - LLHTTPSender::setSender(mHost, new LLCapHTTPSender(url)); - } - else -#endif - { - mCapabilities[name] = url; - } -} - -//OGPX : Agent Domain capabilities... this needs to be refactored -std::string LLAgent::getCapability(const std::string& name) const -{ - CapabilityMap::const_iterator iter = mCapabilities.find(name); - if (iter == mCapabilities.end()) - { - return ""; - } - return iter->second; -} - void LLAgent::showLureDestination(const std::string fromname, const int global_x, const int global_y, const int x, const int y, const int z, const std::string maturity) { const LLVector3d posglobal = LLVector3d(F64(global_x), F64(global_y), F64(0)); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 8fafdd7b9..f697e4778 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -376,15 +376,6 @@ public: const LLColor4 &getEffectColor(); void setEffectColor(const LLColor4 &color); - // OGPX : Moving capabilities off region to agent service means they end up in LLAgent - // but, long term, this needs to be refactored into generalized Capabilities class - // since we want more flexibility in gathering up where services come from. - // Segmenting into region and agent domain caps might not make sense. Some implementations - // might want to provide caps that are not on the region or the agent domain. This is - // unsettled enough for now that we'll leave it as is. - void setCapability(const std::string& name, const std::string& url); - std::string getCapability(const std::string& name) const ; - // // UTILITIES // @@ -538,11 +529,6 @@ public: const LLVector3 &getTargetVelocity() const; const std::string getTeleportSourceSLURL() const { return mTeleportSourceSLURL; } - // OGPX : setTeleportSourceURL() is only used in agent domain case, - // so also made function name go from SLURL->URL for OGPX. - // This is what gets chatted into text chat when a teleport successfully completes. - void setTeleportSourceURL(const std::string agentdTeleportURL){ mTeleportSourceSLURL = agentdTeleportURL;}; - // Setting the ability for this avatar to proxy for another avatar. //static void processAddModifyAbility(LLMessageSystem* msg, void**); @@ -629,7 +615,6 @@ public: TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches" TELEPORT_LOCAL = 6, // Teleporting in-sim without showing the progress screen - TELEPORT_PLACE_AVATAR = 7 // OGPX : Separate agent domain TP using place_avatar from legacy }; ETeleportState getTeleportState() const { return mTeleportState; } @@ -750,11 +735,12 @@ public: // whether look-at reset after teleport bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } +protected: // stuff to do for any sort of teleport. Returns true if the // teleport can proceed. - bool teleportCore(bool is_local = false); //OGPX : now public method so agent domain TP can call + bool teleportCore(bool is_local = false); + -protected: // helper function to prematurely age chat when agent is moving void ageChat(); @@ -954,11 +940,6 @@ private: std::set mProxyForAgents; - - // - typedef std::map CapabilityMap; //OGPX TODO: refactor Caps to their own class - CapabilityMap mCapabilities; // for caps that we have on the agent domain. - LLColor4 mEffectColor; BOOL mHaveHomePosition; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e712c1500..9be7663a2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -305,10 +305,6 @@ BOOL gCrashOnStartup = FALSE; BOOL gLLErrorActivated = FALSE; BOOL gLogoutInProgress = FALSE; -static std::string gPlaceAvatarCap; //OGPX TODO: should belong elsewhere, as part of the llagent caps? - - - //////////////////////////////////////////////////////////// // Internal globals... that should be removed. static std::string gArgs; @@ -3234,18 +3230,6 @@ const std::string& LLAppViewer::getWindowTitle() const return gWindowTitle; } - // OGPX TODO: refactor caps code please, also "PlaceAvatar" is a bit dated, since - // we have since changed the name of the cap -void LLAppViewer::setPlaceAvatarCap(const std::string& uri) -{ - gPlaceAvatarCap = uri; -} - -const std::string& LLAppViewer::getPlaceAvatarCap() const -{ - return gPlaceAvatarCap; -} - // Callback from a dialog indicating user was logged out. bool finish_disconnect(const LLSD& notification, const LLSD& response) { @@ -3896,39 +3880,6 @@ void LLAppViewer::idleShutdown() } } -// OGPX : Instead of sending UDP messages to the sim, tell the Agent Domain about logoff -//... This responder is used with rez_avatar/place when the specialized case -//... of sending a null region name is sent to the agent domain. Null region name means -//... log me off of agent domain. *But* what about cases where you want to be logged into -//... agent domain, but not physically on a region? -class LLLogoutResponder : - public LLHTTPClient::Responder -{ -public: - LLLogoutResponder() - { - } - - ~LLLogoutResponder() - { - } - - void error(U32 statusNum, const std::string& reason) - { - // consider retries - llinfos << "LLLogoutResponder error " - << statusNum << " " << reason << llendl; - } - - void result(const LLSD& content) - { - // perhaps logoutReply should come through this in the future - llinfos << "LLLogoutResponder completed successfully" << llendl; - - } - -}; - void LLAppViewer::idleNameCache() { // Neither old nor new name cache can function before agent has a region diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 24bb2cd4a..d7f99c1bd 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -113,13 +113,6 @@ public: void loadNameCache(); void saveNameCache(); - // OGPX : rez_avatar/place cap is used on both initial login, and - // ... then on teleports as well. The same cap should be good for the - // ... life of the connection to an agent domain. This cap is used by the viewer - // ... to request moving an agent between regions. - void setPlaceAvatarCap(const std::string& uri); // OGPX TODO: this should be refactored into own class that handles caps - const std::string& getPlaceAvatarCap() const; // OGPX TODO: ...as above... - void removeMarkerFile(bool leave_logout_marker = false); // LLAppViewer testing helpers. diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 8469bcda5..3114f2914 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -142,10 +142,7 @@ namespace LLViewerRegion *regionp = gAgent.getRegion(); if (!regionp) { - // OGPX : Changed from llerrs to llwarns. - // No longer an llerrs error, because we might be starting an event queue before we have a region. - - llwarns << "LLEventPoll initialized before region is added." << llendl; + llerrs << "LLEventPoll initialized before region is added." << llendl; } mSender = sender.getIPandPort(); llinfos << "LLEventPoll initialized with sender " << mSender << llendl; @@ -239,12 +236,6 @@ namespace if(gAgent.getRegion() && gAgent.getRegion()->getHost().getIPandPort() == mSender) { llwarns << "Forcing disconnect due to stalled main region event poll." << llendl; - // OGPX - Is this valid in the OGPX case? forceDisconnect() pops up a dialog. - // in the OGPX case, if we lose the connection to the region, we might still - // have one to the Agent Domain. - // Since the viewer doesn't currently implement any functionality that involves - // being connected to the Agent Domain without also being connected to a region, leave the - // call to forceDisconnect() here. LLAppViewer::instance()->forceDisconnect(LLTrans::getString("AgentLostConnection")); } } @@ -253,8 +244,8 @@ namespace //virtual void LLEventPollResponder::result(const LLSD& content) { - LL_DEBUGS("OGPX") << "LLEventPollResponder::result <" << mCount << ">" - << (mDone ? " -- done" : "") << ll_pretty_print_sd(content) << LL_ENDL; + lldebugs << "LLEventPollResponder::result <" << mCount << ">" + << (mDone ? " -- done" : "") << ll_pretty_print_sd(content) << llendl; if (mDone) return; @@ -292,226 +283,6 @@ namespace makeRequest(); } - - // OGPX : So this area of the code is an acknowledged mess... but... - // it is also an area that will be changing a lot as OGPX changes and grows. - // Leave the event queue code completely separate (agent vs region eq) so that - // normal legacy region eq connections aren't subject to the thrashing - // that agent eq code will have. - // - // Similar to the way a sim needs to invoke a request on the client without doing - // an actual inbound http request, this is the similar mechanism for - // the Agent Domain. One area of current investigation is how the viewer - // might accomodate requests from multiple services (i.e., we shouldn't make - // assumptions about how a particular OGPX grid or agent domain has carved up - // the handling of different pieces of functionality). - - - class LLAgentEventPollResponder : public LLHTTPClient::Responder - { - public: - - static LLHTTPClient::ResponderPtr start(const std::string& pollURL); - void stop(); - virtual void makeRequest(); - virtual void makeRequest(const LLSD&); - - private: - LLAgentEventPollResponder(const std::string& pollURL); - ~LLAgentEventPollResponder(); - - //void handleMessage(const LLSD& content); - virtual void error(U32 status, const std::string& reason); - virtual void result(const LLSD& content); - - private: - - bool mDone; - int mAcknowledge ; // OGPX : id of request to send back along with the response to Agent Domain. - // We will probably change the specifics of returning the result of - // a resource request. - - std::string mPollURL; - - // these are only here for debugging so we can see which poller is which - static int sCount; - int mCount; - }; - - - //static - LLHTTPClient::ResponderPtr LLAgentEventPollResponder::start( - const std::string& pollURL) - { - LLHTTPClient::ResponderPtr result = new LLAgentEventPollResponder(pollURL); - LL_INFOS("OGPX") << "LLAgentEventPollResponder::start <" << sCount << "> " - << pollURL << LL_ENDL; - return result; - } - - void LLAgentEventPollResponder::stop() - { - LL_INFOS("OGPX") << "LLAgentEventPollResponder::stop <" << mCount << "> " - << mPollURL << LL_ENDL; - // there should be a way to stop a LLHTTPClient request in progress - mDone = true; - } - - int LLAgentEventPollResponder::sCount = 0; - - LLAgentEventPollResponder::LLAgentEventPollResponder(const std::string& pollURL) - : mDone(false), - mPollURL(pollURL), - mAcknowledge(0), - mCount(++sCount) - { - - makeRequest(); - } - - LLAgentEventPollResponder::~LLAgentEventPollResponder() - { - stop(); - LL_DEBUGS("OGPX") << "LLAgentEventPollResponder::~Impl <" << mCount << "> " - << mPollURL << LL_ENDL; - } - - // OGPX : Should LLAgentEventPollResponder inherits from normal EventPollResponder, - // or will the two classes diverge as we figure out how AgentEventPoll will - // actually work? Me thinks that event queue code will be changed so much that a clear - // sharp division between the classes might not be such a bad thing right now. - // It's especially important to minimize code changes to the XML-RPC legacy path while - // adding OGP code, because that minimizes risk to breaking something in the legacy path. - void LLAgentEventPollResponder::makeRequest() - { - LL_DEBUGS("OGPX") << "LLAgentEventPollResponder::makeRequest <" << mCount << "> "<< LL_ENDL; - LLSD request; - request["ack"] = mAcknowledge; - request["done"] = mDone; - LLHTTPClient::post(mPollURL, request, this); - } - - // OGPX only function passes response back to agent domain. - // This is our backward little way of responding to a request - // for client side resources, and passing something back to the requestor - // in the HTTP stream. The original makeRequest() is in place to provide a - // regular way to 'tap' the agent domain and ask if there were any client side - // resources it needed to request. This function adds the ability to also - // pass back LLSD along with the 'tap' - // - // WARNING: - // This area of the code will change a lot as OGPX is developed. When - // client side resources are invoked, we need some way to pass back - // a response on the event queue. This is one possible way. - void LLAgentEventPollResponder::makeRequest(const LLSD& result_for_agentd) - { - LLSD args; - args["ack"] = mAcknowledge; - args["done"] = mDone; - args["result"] = result_for_agentd; - LL_DEBUGS("OGPX") << "LLAgentEventPollResponder::makeRequest <" << mCount << "> " << ll_pretty_print_sd(result_for_agentd) << LL_ENDL; - LLHTTPClient::post(mPollURL, args, this); - } - - // virtual - void LLAgentEventPollResponder::error(U32 status, const std::string& reason) - { - if (mDone) return; - - if (status != 499) - { - LL_WARNS("OGPX") << "LLAgentEventPollResponder::error: <" << mCount << "> got " - << status << " : " << reason - << (mDone ? " -- done" : "") << LL_ENDL; - stop(); - return; - } - - makeRequest(); - } - - - //virtual - void LLAgentEventPollResponder::result(const LLSD& content) - { - LLSD result_for_agentd; - LL_DEBUGS("OGPX") << "LLAgentEventPollResponder::result <" << mCount << ">" - << (mDone ? " -- done" : "") << LL_ENDL; - - if (mDone) return; - - // was llinfos but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG - LL_DEBUGS("OGPX") << "LLAgentEventPollResponder::completed <" << mCount << "> " << LL_ENDL; - - - if (!content.get("events") || - !content.get("id")) - { - LL_INFOS("OGPX") << "Received event poll with no events or id key" << LL_ENDL; // was llwarns, but too frequent - makeRequest(); - return; - } - mAcknowledge = 0; - mAcknowledge = content["id"]; - LLSD events = content["events"]; - - if (mAcknowledge!=0) - { - LL_WARNS("OGPX") << " : id undefined" << LL_ENDL; - } - - // was llinfos but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG - LL_DEBUGS("OGPX") << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " - << LLSDXMLStreamer(mAcknowledge) << ")" << LL_ENDL; - - // twiddling with making the messaging system gobble up event queue requests -#if OGPXEVENTHACK - // OGPXEVENTHACK : An attempt at using the message_template.msg as a way to add HTTP messages that - // are handled by the event queue (instead of coming across UDP, and being handled via UDP decoding). - // I found that I was able to do this in a limited way (have a message decoded into LLSD, - // and a handler called for it) for inbound EQ messages. Unsure it gives us the level of control - // we need in OGPX to implement policy and trust between the viewer and other entities. The legacy - // model was "trust everything from the region", and it won't be that way in OGPX. - // Feels weird adding dead code to the patch, but I wanted a record of the experimentation - // OGPX TODO: figure out proper building of services. - - // iterate over the requests sent by agent domain - LLSD::array_const_iterator i = events.beginArray(); - LLSD::array_const_iterator end = events.endArray(); - for (; i != end; ++i) - { - if (i->has("message")) - { - std::string message = i->get("message"); - std::string path = "/message/" + message; // OGPX : mmmm....seems like we are gluing it together so traverse can tear it apart - LLSD context; - // so this tries to traverse over the things registered - // in llhttpnode.cpp, but i had trouble getting anything other than message to work - const LLHTTPNode* handler = messageRootNode().traverse(path, context); - if (!handler) - { - LL_WARNS("Messaging") << " no handler for "<< path << LL_ENDL; - return; - } - - //lldebugs << "data: " << LLSDNotationStreamer(message) << llendl; - - // We've found a handler for the request, call its post() and get its LLSD response - // so, changing from the post that was fussing with response pointer to simpler - result_for_agentd = handler->post(*i); - LL_DEBUGS("OGPX") << "after handling "<< ll_pretty_print_sd(*i) << " sending AD result: " << ll_pretty_print_sd(result_for_agentd) << LL_ENDL; - } - } - // OGPXEVENTHACK end - - // OGPX : result_for_agentd is LLSD and passed back to agentd with the next 'tap' - makeRequest(result_for_agentd); -#else - // OGPX :until eventqueue code is redesigned, just send back the regular 'tap' - makeRequest(); -#endif - } - } LLEventPoll::LLEventPoll(const std::string& poll_url, const LLHost& sender) @@ -525,16 +296,3 @@ LLEventPoll::~LLEventPoll() if (event_poll_responder) event_poll_responder->stop(); } -// OGPX : We maintain an event poll with the Agent Domain and with the region -// while OGP9 svn branch tried to use a funky ReverseHTTP thing for the Responder, -// for now we will revert to simpler code. This poll should remain active for the -// life of the viewer session. -LLAgentEventPoll::LLAgentEventPoll(const std::string& pollURL) - : mImpl(LLAgentEventPollResponder::start(pollURL)) -{ -} - - -LLAgentEventPoll::~LLAgentEventPoll() -{ -} diff --git a/indra/newview/lleventpoll.h b/indra/newview/lleventpoll.h index db60f6bbf..5b0087a51 100644 --- a/indra/newview/lleventpoll.h +++ b/indra/newview/lleventpoll.h @@ -50,21 +50,4 @@ private: LLHTTPClient::ResponderPtr mImpl; }; -// Just like the region uses the event poll to invoke services on the viewer, -// the agent domain also does. There will be lots of changes coming to this code, -// for now a nice clean split from the region's event code. -class LLAgentEventPoll //OGPX - ///< implements the viewer side of server-to-viewer pushed events. -{ -public: - LLAgentEventPoll(const std::string& pollURL); - ///< Start polling the URL. - - virtual ~LLAgentEventPoll(); - ///< will stop polling, cancelling any poll in progress. - - -private: - LLHTTPClient::ResponderPtr mImpl; -}; #endif // LL_LLEVENTPOLL_H diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 6a87a7576..3e1f0e1a3 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -2840,13 +2840,6 @@ void LLFloaterCustomize::updateInventoryUI() } } - // OGPX : In place because Assets are not currently supported in OGPX. - // This was originally added as part of OGP9 svn branch because the viewer deeply deeply - // assumes that there *will* be an inventory there. If you never get an inventory, - // Make Outfit breaks badly. - // OGPX TODO: When assets/inventory are supported, the check below can be removed. - // OGPX test if (!gSavedSettings.getString("CmdLineRegionURI").empty()) {all_complete = FALSE;} - childSetEnabled("Make Outfit", all_complete); } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 009d7c5b0..d5c2129ba 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1310,7 +1310,6 @@ void LLInventoryModel::mock(const LLUUID& root_id) void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) { - LL_DEBUGS("Inventory") << " fetch http got " << ll_pretty_print_sd(content) << LL_ENDL; // OGPX start_new_inventory_observer(); /*LLUUID agent_id; @@ -1428,7 +1427,6 @@ class fetchDescendentsResponder: public LLHTTPClient::Responder // Note: this is the handler for WebFetchInventoryDescendents and agent/inventory caps void fetchDescendentsResponder::result(const LLSD& content) { - LL_DEBUGS("Inventory") << " fetch descendents got " << ll_pretty_print_sd(content) << LL_ENDL; // OGPX if (content.has("folders")) { @@ -1650,11 +1648,7 @@ void LLInventoryModel::bulkFetch(std::string url) folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; LL_DEBUGS("Inventory") << " fetching "<getUUID()<<" with cat owner "<getOwnerID()<<" and agent" << gAgent.getID() << LL_ENDL; - //OGPX if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) - // for OGP it really doesnt make sense to have the decision about whether to fetch - // from the library or user cap be determined by a hard coded UUID. - // if it isnt an item that belongs to the agent, then fetch from the library - if (gAgent.getID() != cat->getOwnerID()) //if i am not the owner, it must be in the library + if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) body_lib["folders"].append(folder_sd); else body["folders"].append(folder_sd); @@ -1688,14 +1682,12 @@ void LLInventoryModel::bulkFetch(std::string url) sBulkFetchCount++; if (body["folders"].size()) { - LL_DEBUGS("Inventory") << " fetch descendents post to " << url << ": " << ll_pretty_print_sd(body) << LL_ENDL; // OGPX LLHTTPClient::post(url, body, new fetchDescendentsResponder(body),300.0); } if (body_lib["folders"].size()) { std::string url_lib; url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); - LL_DEBUGS("Inventory") << " fetch descendents lib post: " << ll_pretty_print_sd(body_lib) << LL_ENDL; // OGPX LLHTTPClient::post(url_lib, body_lib, new fetchDescendentsResponder(body_lib),300.0); } sFetchTimer.reset(); @@ -1776,33 +1768,20 @@ void LLInventoryModel::backgroundFetch(void*) { if (sBackgroundFetchActive && gAgent.getRegion()) { - // OGPX : agent/inventory is on gAgent for OGPX. I check both, and give - // ...preference to the one on gAgent. That way the existing non OGP path will remain the same. - // Q: How *should* I handle deciding which cap to use? Maybe I don't want to trust fetching inventory from the region - // OGPX TODO: manage getting caps from more than one service securely. - std::string url = gAgent.getCapability("agent/inventory"); // was WebFetchInventoryDescendents - if (url.empty()) - { - // OGPX : if we didn't get an agent/inventory cap from the Agent Domain, check to see if there was one on the region - // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - // OGPX TODO: this should change when Capabilities are refactored. - // ... this is a trust/security issue. if we have an agent/inventory from the Agent Domain, - // maybe we shouldn't trust WFID from region. - LL_DEBUGS("Inventory") << " no agent/inventory not on AD, checking fallback to region " << LL_ENDL; - url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); - } - if (!url.empty()) + // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. + std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents"); + if (false /*gSavedSettings.getBOOL("UseHTTPInventory")*/ && !url.empty()) { bulkFetch(url); return; } - // If there was no HTTP cap to fetch with, then do the UDP fetch +#if 1 //DEPRECATED OLD CODE FOLLOWS. // no more categories to fetch, stop fetch process if (sFetchQueue.empty()) { - LL_DEBUGS("Inventory") << "Inventory fetch completed" << LL_ENDL; + llinfos << "Inventory fetch completed" << llendl; if (sFullFetchStarted) { sAllFoldersFetched = TRUE; @@ -1818,7 +1797,7 @@ void LLInventoryModel::backgroundFetch(void*) // double timeouts on failure sMinTimeBetweenFetches = llmin(sMinTimeBetweenFetches * 2.f, 10.f); sMaxTimeBetweenFetches = llmin(sMaxTimeBetweenFetches * 2.f, 120.f); - LL_DEBUGS("Inventory") << "Inventory fetch times grown to (" << sMinTimeBetweenFetches << ", " << sMaxTimeBetweenFetches << ")" << LL_ENDL; + llinfos << "Inventory fetch times grown to (" << sMinTimeBetweenFetches << ", " << sMaxTimeBetweenFetches << ")" << llendl; // fetch is no longer considered "timely" although we will wait for full time-out sTimelyFetchPending = FALSE; } @@ -1913,6 +1892,11 @@ void LLInventoryModel::backgroundFetch(void*) // not enough time has elapsed to do a new fetch break; } + + // + // DEPRECATED OLD CODE + //-------------------------------------------------------------------------------- +#endif } } @@ -2192,57 +2176,53 @@ bool LLInventoryModel::loadSkeleton( const LLSD& options, const LLUUID& owner_id) { - LL_INFOS("OGPX") << "importing inventory skeleton for " << owner_id << LL_ENDL; - LL_DEBUGS("Inventory") << " skeleton is " << ll_pretty_print_sd(options) << LL_ENDL; + lldebugs << "importing inventory skeleton for " << owner_id << llendl; typedef std::set, InventoryIDPtrLess> cat_set_t; cat_set_t temp_cats; - - update_map_t child_counts; - - LLUUID id; - LLAssetType::EType preferred_type; bool rv = true; - for (LLSD::array_const_iterator it = options.beginArray(); it < options.endArray(); ++it) + + for(LLSD::array_const_iterator it = options.beginArray(), + end = options.endArray(); it != end; ++it) { - LLPointer cat = new LLViewerInventoryCategory(owner_id); - - LL_DEBUGS("Inventory") << "cat name, folder, parent, type " << (*it)["name"].asString() << " " << (*it)["folder_id"].asUUID() << " " << (*it)["parent_id"].asUUID() << " " << (*it)["type_default"].asString() << " " << LL_ENDL; // OGPX - if ((*it)["name"].asString().empty()) goto clean_cat; - cat->rename((*it)["name"].asString().c_str()); - if ((*it)["folder_id"].asUUID().isNull()) goto clean_cat; - id = (*it)["folder_id"].asUUID(); - // if an id is null, it locks the viewer. - if (id.isNull()) goto clean_cat; - cat->setUUID(id); - // OGPX : slight change in snowglobe non OGP handling of things with null parents vs OGP9 SVN branch - // OGPX : so commented this line out for OGPX as well. if((*it)["parent_id"].asUUID().isNull()) goto clean_cat; - id = (*it)["parent_id"].asUUID(); - cat->setParent(id); - if ((*it)["type_default"].asString().empty()) + LLSD name = (*it)["name"]; + LLSD folder_id = (*it)["folder_id"]; + LLSD parent_id = (*it)["parent_id"]; + LLSD version = (*it)["version"]; + if(name.isDefined() + && folder_id.isDefined() + && parent_id.isDefined() + && version.isDefined() + && folder_id.asUUID().notNull() // if an id is null, it locks the viewer. + ) { - preferred_type = LLAssetType::AT_NONE; + LLPointer cat = new LLViewerInventoryCategory(owner_id); + cat->rename(name.asString()); + cat->setUUID(folder_id.asUUID()); + cat->setParent(parent_id.asUUID()); + + LLAssetType::EType preferred_type = LLAssetType::AT_NONE; + LLSD type_default = (*it)["type_default"]; + if(type_default.isDefined()) + { + preferred_type = (LLAssetType::EType)type_default.asInteger(); + } + cat->setPreferredType(preferred_type); + cat->setVersion(version.asInteger()); + temp_cats.insert(cat); } else { - S32 t = (*it)["type_default"].asInteger(); - preferred_type = (LLAssetType::EType)t; + llwarns << "Unable to import near " << name.asString() << llendl; + rv = false; } - cat->setPreferredType(preferred_type); - if ((*it)["version"].asString().empty()) goto clean_cat; - cat->setVersion((*it)["version"].asInteger()); - temp_cats.insert(cat); - continue; - clean_cat: - llwarns << "Unable to import near " << cat->getName() << llendl; - rv = false; - //delete cat; // automatic when cat is reasigned or destroyed } - + S32 cached_category_count = 0; S32 cached_item_count = 0; - if (!temp_cats.empty()) + if(!temp_cats.empty()) { + update_map_t child_counts; cat_array_t categories; item_array_t items; cat_set_t invalid_categories; // Used to mark categories that weren't successfully loaded. @@ -2312,9 +2292,9 @@ bool LLInventoryModel::loadSkeleton( } // go ahead and add the cats returned during the download - std::set::iterator not_cached_id = cached_ids.end(); + std::set::const_iterator not_cached_id = cached_ids.end(); cached_category_count = cached_ids.size(); - for (cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) + for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) { if (cached_ids.find((*it)->getUUID()) == not_cached_id) { @@ -2330,30 +2310,32 @@ bool LLInventoryModel::loadSkeleton( // Add all the items loaded which are parented to a // category with a correctly cached parent - count = items.count(); S32 bad_link_count = 0; cat_map_t::iterator unparented = mCategoryMap.end(); - for (int i = 0; i < count; ++i) + for(item_array_t::const_iterator item_iter = items.begin(); + item_iter != items.end(); + ++item_iter) { - cat_map_t::iterator cit = mCategoryMap.find(items[i]->getParentUUID()); + LLViewerInventoryItem *item = (*item_iter).get(); + const cat_map_t::iterator cit = mCategoryMap.find(item->getParentUUID()); - if (cit != unparented) + if(cit != unparented) { - LLViewerInventoryCategory* cat = cit->second; - if (cat->getVersion() != NO_VERSION) + const LLViewerInventoryCategory* cat = cit->second.get(); + if(cat->getVersion() != NO_VERSION) { // This can happen if the linked object's baseobj is removed from the cache but the linked object is still in the cache. - if (items[i]->getIsBrokenLink()) + if (item->getIsBrokenLink()) { bad_link_count++; lldebugs << "Attempted to add cached link item without baseobj present ( name: " - << items[i]->getName() << " itemID: " << items[i]->getUUID() - << " assetID: " << items[i]->getAssetUUID() + << item->getName() << " itemID: " << item->getUUID() + << " assetID: " << item->getAssetUUID() << " ). Ignoring and invalidating " << cat->getName() << " . " << llendl; invalid_categories.insert(cit->second); continue; } - addItem(items[i]); + addItem(item); cached_item_count += 1; ++child_counts[cat->getUUID()]; } @@ -2392,17 +2374,17 @@ bool LLInventoryModel::loadSkeleton( // At this point, we need to set the known descendents for each // category which successfully cached so that we do not // needlessly fetch descendents for categories which we have. - update_map_t::iterator no_child_counts = child_counts.end(); - update_map_t::iterator the_count; - for (cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) + update_map_t::const_iterator no_child_counts = child_counts.end(); + for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) { - LLViewerInventoryCategory* cat = (*it); - if (cat->getVersion() != NO_VERSION) + LLViewerInventoryCategory* cat = (*it).get(); + if(cat->getVersion() != NO_VERSION) { - the_count = child_counts.find(cat->getUUID()); - if (the_count != no_child_counts) + update_map_t::const_iterator the_count = child_counts.find(cat->getUUID()); + if(the_count != no_child_counts) { - cat->setDescendentCount((*the_count).second.mValue); + const S32 num_descendents = (*the_count).second.mValue; + cat->setDescendentCount(num_descendents); } else { @@ -2425,341 +2407,30 @@ bool LLInventoryModel::loadSkeleton( categories.clear(); // will unref and delete entries } - LL_DEBUGS("Inventory") << "Successfully loaded " << cached_category_count + llinfos << "Successfully loaded " << cached_category_count << " categories and " << cached_item_count << " items from cache." - << LL_ENDL; + << llendl; return rv; } +//OGPX crap. Since this function is actually functionally the same as its LLSD variant.. +// just convert options_t to LLSD and route to the LLSD version. Yuck. bool LLInventoryModel::loadSkeleton( const LLInventoryModel::options_t& options, const LLUUID& owner_id) { - lldebugs << "importing inventory skeleton for " << owner_id << llendl; - - typedef std::set, InventoryIDPtrLess> cat_set_t; - cat_set_t temp_cats; - - update_map_t child_counts; - - LLUUID id; - LLAssetType::EType preferred_type; - bool rv = true; + LLSD options_list; for(options_t::const_iterator it = options.begin(); it < options.end(); ++it) { - LLPointer cat = new LLViewerInventoryCategory(owner_id); - response_t::const_iterator no_response = (*it).end(); - response_t::const_iterator skel; - skel = (*it).find("name"); - if(skel == no_response) goto clean_cat; - cat->rename(std::string((*skel).second)); - skel = (*it).find("folder_id"); - if(skel == no_response) goto clean_cat; - id.set((*skel).second); - // if an id is null, it locks the viewer. - if(id.isNull()) goto clean_cat; - cat->setUUID(id); - skel = (*it).find("parent_id"); - if(skel == no_response) goto clean_cat; - id.set((*skel).second); - cat->setParent(id); - skel = (*it).find("type_default"); - if(skel == no_response) + LLSD entry; + for(response_t::const_iterator it2 = it->begin(); it2 != it->end(); ++it2) { - preferred_type = LLAssetType::AT_NONE; + entry[it2->first]=it2->second; } - else - { - S32 t = atoi((*skel).second.c_str()); - preferred_type = (LLAssetType::EType)t; - } - cat->setPreferredType(preferred_type); - skel = (*it).find("version"); - if(skel == no_response) goto clean_cat; - cat->setVersion(atoi((*skel).second.c_str())); - temp_cats.insert(cat); - continue; - clean_cat: - llwarns << "Unable to import near " << cat->getName() << llendl; - rv = false; - //delete cat; // automatic when cat is reasigned or destroyed + options_list.append(entry); } - - S32 cached_category_count = 0; - S32 cached_item_count = 0; - if(!temp_cats.empty()) - { - cat_array_t categories; - item_array_t items; - cat_set_t invalid_categories; // Used to mark categories that weren't successfully loaded. - std::string owner_id_str; - owner_id.toString(owner_id_str); - std::string path(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, owner_id_str)); - std::string inventory_filename; - inventory_filename = llformat(CACHE_FORMAT_STRING, path.c_str()); - const S32 NO_VERSION = LLViewerInventoryCategory::VERSION_UNKNOWN; - std::string gzip_filename(inventory_filename); - gzip_filename.append(".gz"); - LLFILE* fp = LLFile::fopen(gzip_filename, "rb"); - bool remove_inventory_file = false; - if(fp) - { - fclose(fp); - fp = NULL; - if(gunzip_file(gzip_filename, inventory_filename)) - { - // we only want to remove the inventory file if it was - // gzipped before we loaded, and we successfully - // gunziped it. - remove_inventory_file = true; - } - else - { - llinfos << "Unable to gunzip " << gzip_filename << llendl; - } - } - bool is_cache_obsolete = false; - if (loadFromFile(inventory_filename, categories, items, is_cache_obsolete)) - { - // We were able to find a cache of files. So, use what we - // found to generate a set of categories we should add. We - // will go through each category loaded and if the version - // does not match, invalidate the version. - S32 count = categories.count(); - cat_set_t::iterator not_cached = temp_cats.end(); - std::set cached_ids; - for(S32 i = 0; i < count; ++i) - { - LLViewerInventoryCategory* cat = categories[i]; - cat_set_t::iterator cit = temp_cats.find(cat); - if (cit == temp_cats.end()) - { - continue; // cache corruption?? not sure why this happens -SJB - } - LLViewerInventoryCategory* tcat = *cit; - - // we can safely ignore anything loaded from file, but - // not sent down in the skeleton. - if(cit == not_cached) - { - continue; - } - if(cat->getVersion() != tcat->getVersion()) - { - // if the cached version does not match the server version, - // throw away the version we have so we can fetch the - // correct contents the next time the viewer opens the folder. - tcat->setVersion(NO_VERSION); - } - else - { - cached_ids.insert(tcat->getUUID()); - } - } - - // go ahead and add the cats returned during the download - std::set::iterator not_cached_id = cached_ids.end(); - cached_category_count = cached_ids.size(); - for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) - { - if(cached_ids.find((*it)->getUUID()) == not_cached_id) - { - // this check is performed so that we do not - // mark new folders in the skeleton (and not in cache) - // as being cached. - LLViewerInventoryCategory *llvic = (*it); - llvic->setVersion(NO_VERSION); - } - addCategory(*it); - ++child_counts[(*it)->getParentUUID()]; - } - - // Add all the items loaded which are parented to a - // category with a correctly cached parent - count = items.count(); - S32 bad_link_count = 0; - cat_map_t::iterator unparented = mCategoryMap.end(); - for(int i = 0; i < count; ++i) - { - cat_map_t::iterator cit = mCategoryMap.find(items[i]->getParentUUID()); - - if(cit != unparented) - { - LLViewerInventoryCategory* cat = cit->second; - if(cat->getVersion() != NO_VERSION) - { - // This can happen if the linked object's baseobj is removed from the cache but the linked object is still in the cache. - if (items[i]->getIsBrokenLink()) - { - bad_link_count++; - lldebugs << "Attempted to add cached link item without baseobj present ( name: " - << items[i]->getName() << " itemID: " << items[i]->getUUID() - << " assetID: " << items[i]->getAssetUUID() - << " ). Ignoring and invalidating " << cat->getName() << " . " << llendl; - invalid_categories.insert(cit->second); - continue; - } - addItem(items[i]); - cached_item_count += 1; - ++child_counts[cat->getUUID()]; - } - } - } - if (bad_link_count > 0) - { - llinfos << "Attempted to add " << bad_link_count - << " cached link items without baseobj present. " - << "The corresponding categories were invalidated." << llendl; - } - } - else - { - // go ahead and add everything after stripping the version - // information. - for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) - { - LLViewerInventoryCategory *llvic = (*it); - llvic->setVersion(NO_VERSION); - addCategory(*it); - } - } - - // Invalidate all categories that failed fetching descendents for whatever - // reason (e.g. one of the descendents was a broken link). - for (cat_set_t::iterator invalid_cat_it = invalid_categories.begin(); - invalid_cat_it != invalid_categories.end(); - invalid_cat_it++) - { - LLViewerInventoryCategory* cat = (*invalid_cat_it).get(); - cat->setVersion(NO_VERSION); - llinfos << "Invalidating category name: " << cat->getName() << " UUID: " << cat->getUUID() << " due to invalid descendents cache" << llendl; - } - - // At this point, we need to set the known descendents for each - // category which successfully cached so that we do not - // needlessly fetch descendents for categories which we have. - update_map_t::iterator no_child_counts = child_counts.end(); - update_map_t::iterator the_count; - for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) - { - LLViewerInventoryCategory* cat = (*it); - if(cat->getVersion() != NO_VERSION) - { - the_count = child_counts.find(cat->getUUID()); - if(the_count != no_child_counts) - { - cat->setDescendentCount((*the_count).second.mValue); - } - else - { - cat->setDescendentCount(0); - } - } - } - - if(remove_inventory_file) - { - // clean up the gunzipped file. - LLFile::remove(inventory_filename); - } - if (is_cache_obsolete) - { - // If out of date, remove the gzipped file too. - llwarns << "Inv cache out of date, removing" << llendl; - LLFile::remove(gzip_filename); - } - categories.clear(); // will unref and delete entries - } - - LL_DEBUGS("Inventory") << "Successfully loaded " << cached_category_count - << " categories and " << cached_item_count << " items from cache." - << LL_ENDL; - - return rv; -} - -bool LLInventoryModel::loadMeat( - const LLInventoryModel::options_t& options, const LLUUID& owner_id) -{ - llinfos << "importing inventory for " << owner_id << llendl; - LLPermissions default_perm; - default_perm.init(LLUUID::null, owner_id, LLUUID::null, LLUUID::null); - LLPointer item; - LLUUID id; - LLAssetType::EType type; - LLInventoryType::EType inv_type; - bool rv = true; - for(options_t::const_iterator it = options.begin(); it < options.end(); ++it) - { - item = new LLViewerInventoryItem; - response_t::const_iterator no_response = (*it).end(); - response_t::const_iterator meat; - meat = (*it).find("name"); - if(meat == no_response) goto clean_item; - item->rename(std::string((*meat).second)); - meat = (*it).find("item_id"); - if(meat == no_response) goto clean_item; - id.set((*meat).second); - item->setUUID(id); - meat = (*it).find("parent_id"); - if(meat == no_response) goto clean_item; - id.set((*meat).second); - item->setParent(id); - meat = (*it).find("type"); - if(meat == no_response) goto clean_item; - type = (LLAssetType::EType)atoi((*meat).second.c_str()); - item->setType(type); - meat = (*it).find("inv_type"); - if(meat != no_response) - { - inv_type = (LLInventoryType::EType)atoi((*meat).second.c_str()); - item->setInventoryType(inv_type); - } - meat = (*it).find("data_id"); - if(meat == no_response) goto clean_item; - id.set((*meat).second); - if(LLAssetType::AT_CALLINGCARD == type) - { - LLPermissions perm; - perm.init(id, owner_id, LLUUID::null, LLUUID::null); - item->setPermissions(perm); - } - else - { - meat = (*it).find("perm_mask"); - if(meat != no_response) - { - PermissionMask perm_mask = atoi((*meat).second.c_str()); - default_perm.initMasks( - perm_mask, perm_mask, perm_mask, perm_mask, perm_mask); - } - else - { - default_perm.initMasks( - PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE); - } - item->setPermissions(default_perm); - item->setAssetUUID(id); - } - meat = (*it).find("flags"); - if(meat != no_response) - { - item->setFlags(strtoul((*meat).second.c_str(), NULL, 0)); - } - meat = (*it).find("time"); - if(meat != no_response) - { - item->setCreationDate(atoi((*meat).second.c_str())); - } - addItem(item); - continue; - clean_item: - llwarns << "Unable to import near " << item->getName() << llendl; - rv = false; - //delete item; // automatic when item is reassigned or destroyed - } - return rv; + return loadSkeleton(options_list,owner_id); } // This is a brute force method to rebuild the entire parent-child diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 6fdb59d1a..16b17d034 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -382,13 +382,9 @@ public: // during authentication. return true if everything parsed. typedef std::map response_t; typedef std::vector options_t; - // OGPX : Two loadSkeleton(), one for the XML-RPC logins, one for LLSD - //... The concept of a skeleton being different from the cap that - //... we do inventory queries on should be examined, and the usage of - //... the skeleton in querying the wearables needs to be examined as well. - bool loadSkeleton(const options_t& options, const LLUUID& owner_id); - bool loadMeat(const options_t& options, const LLUUID& owner_id); + //OGPX really screwed with the login process. This is needed until it's all sorted out. + bool loadSkeleton(const options_t& options, const LLUUID& owner_id); /** Mutators ** ** *******************************************************************************/ diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 07c8de068..67d7e92b0 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -60,7 +60,6 @@ #include "llcachename.h" #include "llviewercontrol.h" #include "lldir.h" -#include "lleventpoll.h" // OGPX for Agent Domain event queue #include "llerrorcontrol.h" #include "llfiltersd2xmlrpc.h" #include "llfocusmgr.h" @@ -140,7 +139,6 @@ #include "llpreview.h" #include "llpreviewscript.h" #include "llproductinforequest.h" -#include "llsdhttpserver.h" // OGPX might not need when EVENTHACK is sorted #include "llsecondlifeurls.h" #include "llselectmgr.h" #include "llsky.h" diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index fd779746e..e154234b1 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -273,7 +273,6 @@ void LLViewerInventoryItem::setTransactionID(const LLTransactionID& transaction_ // virtual void LLViewerInventoryItem::packMessage(LLMessageSystem* msg) const { - LL_INFOS("Inventory") << " UDP Rez/UpdateObject of UUID " << mUUID << " parent = " << mParentUUID << " type= " << mType << " transaction= "<< mTransactionID << LL_ENDL; // OGPX msg->addUUIDFast(_PREHASH_ItemID, mUUID); msg->addUUIDFast(_PREHASH_FolderID, mParentUUID); mPermissions.packMessage(msg); @@ -503,11 +502,20 @@ bool LLViewerInventoryCategory::fetchDescendents() // This comes from LLInventoryFilter from llfolderview.h U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1; - std::string url = gAgent.getCapability("agent/inventory"); // OGPX : was WebFetchInventoryDescendents - if (url.empty()) //OGPX : agent/inventory Capability not found on agent domain. See if the region has one. + // *NOTE: For bug EXT-2879, originally commented out + // gAgent.getRegion()->getCapability in order to use the old + // message-based system. This has been uncommented now that + // AIS folks are aware of the issue and have a fix in process. + // see ticket for details. + + std::string url; + if (gAgent.getRegion()) { - llinfos << " agent/inventory not on AD, checking fallback to region " << llendl; //OGPX - url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); + url = gAgent.getRegion()->getCapability("FetchInventoryDescendents"); + } + else + { + llwarns << "agent region is null" << llendl; } if (!url.empty()) //Capability found. Build up LLSD and use it. { @@ -515,7 +523,7 @@ bool LLViewerInventoryCategory::fetchDescendents() } else { //Deprecated, but if we don't have a capability, use the old system. - llinfos << "WebFetchInventoryDescendents or agent/inventory capability not found. Using deprecated UDP message." << llendl; + llinfos << "FetchInventoryDescendents capability not found. Using deprecated UDP message." << llendl; LLMessageSystem* msg = gMessageSystem; msg->newMessage("FetchInventoryDescendents"); msg->nextBlock("AgentData"); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d122e012c..753f1ab42 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3698,19 +3698,6 @@ void process_teleport_finish(LLMessageSystem* msg, void**) effectp->setColor(LLColor4U(gAgent.getEffectColor())); LLHUDManager::getInstance()->sendEffects(); - // OGPX : when using agent domain, we get tp finish with ip of 0.0.0.0 and port 0. - // try bailing out early if tp state is PLACE_AVATAR (so legacy should still execute rest of this path) - // not really wild about this, but it's a way to test if we can get TP working w/o receiving TP finish - // TODO: can be removed *when* agent domain no longer sends tp finish - // - // OGPX TODO: see if we can nuke TELEPORT_PLACE_AVATAR state once TeleportFinish is - // completely removed from all SL and OS region code - - if (gAgent.getTeleportState() == LLAgent::TELEPORT_PLACE_AVATAR ) - { - llinfos << "Got teleport location message when doing agentd TP" << llendl; - return; - } U32 location_id; U32 sim_ip; U16 sim_port; @@ -3883,10 +3870,8 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) gCacheName->setUpstream(msg->getSender()); gViewerThrottle.sendToSim(); gViewerWindow->sendShapeToSim(); - // if this is an AgentMovementComplete message that happened as the result of a teleport, - // then we need to do things like chat the URL and reset the camera. - bool is_teleport = (gAgent.getTeleportState() & (LLAgent::TELEPORT_MOVING | LLAgent::TELEPORT_PLACE_AVATAR)); //OGPX - llinfos << " is_teleport =" << is_teleport << llendl; + + bool is_teleport = gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING; if( is_teleport ) { @@ -3922,11 +3907,6 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) avatarp->clearChat(); avatarp->slamPosition(); } - // OGPX TODO: remove all usage of TELEPORT_PLACE_AVATAR state once Teleport UDP sequence finalized - if ( gAgent.getTeleportState() == LLAgent::TELEPORT_PLACE_AVATAR ) // unset TP state, agent domain is done. OGPX - { - gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); - } // add teleport destination to the list of visited places gFloaterTeleportHistory->addPendingEntry(regionp->getName(), (S16)agent_pos.mV[VX], (S16)agent_pos.mV[VY], (S16)agent_pos.mV[VZ]); @@ -3935,6 +3915,17 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { // This is likely just the initial logging in phase. gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); + + if(LLStartUp::getStartupState() < STATE_STARTED) + { // This is initial log-in, not a region crossing: + // Set the camera looking ahead of the AV so send_agent_update() below + // will report the correct location to the server. + LLVector3 look_at_point = look_at; + look_at_point = agent_pos + look_at_point.rotVec(gAgent.getQuat()); + + static LLVector3 up_direction(0.0f, 0.0f, 1.0f); + LLViewerCamera::getInstance()->lookAt(agent_pos, look_at_point, up_direction); + } } if ( LLTracker::isTracking(NULL) ) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b3a123eed..3ab4390d7 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1452,9 +1452,13 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("DispatchRegionInfo"); capabilityNames.append("EstateChangeInfo"); capabilityNames.append("EventQueueGet"); - capabilityNames.append("FetchInventory"); - capabilityNames.append("FetchLib"); - capabilityNames.append("FetchLibDescendents"); + if (false)//gSavedSettings.getBOOL("UseHTTPInventory")) //Caps suffixed with 2 by LL. Don't update until rest of fetch system is updated first. + { + capabilityNames.append("FetchLib"); + capabilityNames.append("FetchLibDescendents"); + capabilityNames.append("FetchInventory"); + capabilityNames.append("FetchInventoryDescendents"); + } capabilityNames.append("GetTexture"); capabilityNames.append("GroupProposalBallot"); capabilityNames.append("GetDisplayNames"); @@ -1491,10 +1495,6 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("UploadBakedTexture"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); - capabilityNames.append("WebFetchInventoryDescendents"); // OGPX : since this is asking the region - // leave the old naming in place, on agent domain - // it is now called agent/inventory. Both - // caps have the same LLSD returned. // Please add new capabilities alphabetically to reduce // merge conflicts.